> 
> Prove the following ‘fixed point theorem’: For every continuous
> function $f : [0, 1] → [0, 1]$ there exists $x ∈ [0, 1]$ such that $f(x) = x$
> 
> 
> 

Proof:
Let function $g(x)=f(x)-x$，and because $f(x)$ and $x$ are continuous on [0,1], $g(x)$ is also continuous on [0,1]

Then because the codomain of $f(x)$ is [0,1], $0\leq f(x)\leq1 \implies -x\leq f(x)-x\leq 1-x$

Thus,$-x\leq g(x)\leq 1-x$ and in particular $0\leq g(0)\leq 1$ and $-1\leq g(1)\leq 0$

Hence, $g(1)\leq 0\leq g(0)$ and then there exists a $x\in[0,1]$ such that $g(x)=0$

As a result, there exists a $x\in[0,1]$ such that $f(x)=x$

Is this a correct proof? The thing I'm not sure about is that the intermediate value theorem states that if $f$ is continuous on [a,b] and with $f(a)<c<f(b)$. Then there exists a $x\in[a,b]$ such that $f(x)=c$. However, in this proof, I use "less or equal to" rather than strictly "less that" . Will this make something wrong?