Theorem (Fundamental Theorem of Calculus). Let $f : [a,b]\to \mathbb R$ be a
continuous
For each $x$, and for each $\varepsilon>0$, there exists a $\delta$ such that $|f(y)-f(x)|<\varepsilon$ for each $y$ such that $|y-x|<\delta$.
function. Then there exists a function $F: [a,b]\to \mathbb R$ such that $F'(x)=f(x)$ for all $x\in [a, b]$, and it is unique up to an additive constant.
The preimage of any open set is open.
Any open cover has a finite subcover.
It cannot be decomposed as the union of two disjoint, nonempty open subsets.
For a partition $P=\{a=x_0 < x_1 < \ldots < x_n=b\}$ of the interval $[a, b]$, define the upper and lower sums by $$ U(P)=\sum_{i=1}^n \left(\sup_{x_{i-1}\leq x\leq x_i} f(x)\right) (x_i-x_{i-1}) \qquad L(P)=\sum_{i=1}^n \left(\inf_{x_{i-1}\leq x\leq x_i} f(x)\right) (x_i-x_{i-1}) $$ If both the infimum of $U(P)$ and the supremum of $L(P)$ over all partitions $P$ of $[a, b]$ exist and are equal, then we say that $f(x)$ is Riemann integrable over $[a, b]$ and the Riemann integral is defined by the common value $$ \int_a^b f(x)\,dx = \inf_P U(P) = \sup_P L(P)$$
Proof. To construct such a function $F: [a, b]\to \mathbb R$, we define $$ F(x)=\int_a^x f(t)\, dt \qquad x\in [a,b] $$ as a
Riemann integral. Since $f$ is continuous, this is well-defined. To find its derivative, consider $$ \frac{F(x+h)-F(x)}{h}=\frac{1}{h}\int_x^{x+h} f(t)\,dt $$ for $h\not =0$, small enough that $x+h\in [a, b]$. By the Mean Value Theorem for definite integrals
...,
By applying the Extreme Value Theorem
...
By Heine-Borel, a subset of $\mathbb R$ is compact if and only if it is closed and bounded. The image of a compact set under a continuous map is compact, so a continuous function on a closed interval must attain its maximum and minimum.
on $f$ over the interval $[x, x+h]$, $f$ attains its minimum and maximum at some points $c_1$ and $c_2$, i.e. $$ f(c_1) \leq f(t) \leq f(c_2) \qquad \forall\; t\in[x, x+h].$$ Integrating over the interval $[x, x+h]$ and dividing by $h$, we obtain $$ f(c_1) \leq \frac{1}{h}\int_x^{x+h} f(t)\, dt \leq f(c_2) $$ By the Intermediate Value Theorem
...,
The image of a connected set under a continuous map is connected.
there exists some $c\in [c_1, c_2]$ such that $$ f(c)=\frac{1}{h}\int_x^{x+h} f(t)\,dt $$
$f$ attains its "mean value" over the interval $[x,x+h]$, i.e., $$ \frac{1}{h}\int_x^{x+h} f(t)\,dt = f(c)$$ for some $c\in[x,x+h]$. Therefore, $$ F'(x)=\lim_{h\to 0} \frac{F(x+h)-F(x)}{h} = \lim_{h\to 0} f(c) = f(x) $$ by the continuity of $f$.
For uniqueness, let $G: [a, b]\to\mathbb R$ be another function with $G'(x)=f(x)$, so that $F-G$ is a function such that $(F-G)'(x)=F'(x)-G'(x)=f(x)-f(x)=0$ for all $x\in [a,b]$. By a corollary to the Mean Value Theorem, $F-G$ is constant over $[a,b]$.
more details...
Fix $x\in (a,b]$, and apply the Mean Value Theorem
...
to $F-G$ on the interval $[a, x]$. Then there exists $c\in (a, x)$ such that $$ (F-G)'(c)=\frac{(F-G)(a)-(F-G)(x)}{a-x}. $$ On the other hand, $(F-G)'(c)=f(c)-f(c)=0$, so $$ (F-G)(x) = (F-G)(a) $$ for all $x\in [a, b]$. It follows that $G(x)=F(x)+C$ for some constant $C$.
$\square$