I want to verify if my proof regarding the $d(x,y) = 0 \iff x=y$ property of a metric space is correct. I have seen some other approaches to this here, but I want to check if my use of the contrapositive and the subsequent reasoning is ok.
Define $I_1: C^0([0,1]) \times C^0([0,1]) \to [0, \infty) $ by $$I_1(f,g) = \int_0^1 |f(x) - g(x)| dx$$
We claim that $I_1(f,g) = 0 \iff f=g$.
Suppose $f=g$, then $I_1(f,g) =0$, as we are integrating $0$.
Suppose $f\neq g$. Then there exists some $x \in [0,1]$ for which $f(x) \neq g(x)$ and without loss of generality suppose $f(x)>g(x)$. Since $f$ and $g$ are continuous functions, then $f-g$ is also continuous. In particular, $f-g$ is continuous at $x$. Choose $\varepsilon = (f-g)(x)$, there exists a $\delta>0$ such that $|x-y|<\delta \implies |(f-g)(x) - (f-g)(y)| < \varepsilon$.
Thus, for $y \in B_\delta(x)$ we have $(f-g)(y) >0$, otherwise, our choice of $\varepsilon$ leads to a contradiction.
To be explicit, suppose that $(f-g)(y) = 0$. Then we see that $|(f-g)(x) - 0 | < \varepsilon \implies \varepsilon <\varepsilon$. Suppose that $(f-g)(y) <0$. Then $|(f-g)(x) - (f-g)(y)| > \varepsilon= (f-g)(x)$.
Now consider $z \in \overline{B_{\frac{\delta}{2}}(x)}$. We must have $(f-g)(z) > 0$ for all $z$ since $\overline{B_{\frac{\delta}{2}}(x)}\subsetneq B_\delta(x)$. Further, since $\overline{B_{\frac{\delta}{2}}(x)}$ is closed, $f-g$ attains a minimum on it by the extreme value theorem. Thus,
$$I_1(f,g) > \int_{x -\frac{\delta}{2}}^{x + \frac{\delta}{2}} |f(x) - g(x)| dx \geq \delta\cdot \min\left\{(f-g)(z) : z \in \overline{B_{\frac{\delta}{2}}(x)}\right\} >0$$