A partition $P$ of an interval $[a,b]$ is a finite subset of points $P=\{x_0, x_1, \dots, x_n\}$ such that,
$$ a=x_0 \leq x_1 \leq \dots \leq x_{n-1} \leq x_n = b \\ \text{ with } \Delta x_i := x_i - x_{i-1} $$

A refinement $P^*$ **of a partition $P$ is another partition of the same interval such that $P \sube P^$. Moreover, if $P_1$ and $P_2$ are partitions of some intervals, which are not necessarily the same, the partition $P^ = P_1 \cup P_2$ is called their common refinement.
<aside> <img src="/icons/castle_yellow.svg" alt="/icons/castle_yellow.svg" width="40px" />
Refinements change Riemann Sums. For a partition $P$ of $[a, b]$ with refinement $P^*$,
$$ L(P, f) \leq L(P^, f) \text{ and } U(P, f) \geq U(P^, f) $$
</aside>
<aside> <img src="/icons/castle_yellow.svg" alt="/icons/castle_yellow.svg" width="40px" />
Partitions Potpurri.
$$ U(P, f) - L(P, f) <\varepsilon \implies U(P^, f) - L(P^, f) < \varepsilon $$
$$ U(P, f) -L(P, f) < \varepsilon \implies \sum _{i=1}^n |f(s_i)- f(t_i)|\Delta x_i < \varepsilon $$
$$ U(P, f) -L(P, f) < \varepsilon \implies |\sum _{i=1}^n f(t_i)\Delta x_i- \int _{a}^b f\,dx| < \varepsilon $$
</aside>
Consider $f :[a,b] \rightarrow \R$ be a bounded function. For each partition $P$ of $[a, b]$, define the following:
$$ M_i := \sup {x{i=1} \leq x \leq x_i} f(x) \hspace{55pt} U(P, f) := \sum _{i=1}^n M_i \Delta x_i \\ m_i :=\inf {x{i=1} \leq x \leq x_i} f(x) \hspace{55pt} L(P, f) := \sum _{i=1}^n m_i \Delta x_i $$

Graphical Intuition. The quantities $M_i$ and $m_i$ are the largest function value within each subinterval of the partition. Collating these, the Upper Riemann Sum $U(P, f)$ is the sum of the areas of the over approximated rectangles formed by the $M_i$s and the Lower Riemann Sum $L(P, f)$ is the sum of the areas of the under approximated rectangles formed by the $m_i$s.
From these upper and lower Riemann sums, we define the Upper and Lower Riemann Integrals as the tightest approximations of the area under $f$ from both sides.
$$ \overline{\int_a^b} f \, dx := \inf _{P} U(P, f) \hspace{15pt} \underline{\int _{a} ^b } f \, dx := \sup _{P} L(P, f) $$
If the upper and lower Riemann integrals agree, we say that $f$ is integrable, denoted $f \in \mathscr{R} (a, b)$, and use the following notation for its common value.
$$ \overline{\int_a^b} f \, dx = \underline{\int _{a} ^b } f \, dx = \int _{a } ^b f\, dx $$
<aside> <img src="/icons/castle_yellow.svg" alt="/icons/castle_yellow.svg" width="40px" />
Ordering of Riemann Integrals.
$$ \overline{\int_a^b} f \, dx \geq \underline{\int _{a} ^b } f \, dx $$
<aside> <img src="/icons/castle_yellow.svg" alt="/icons/castle_yellow.svg" width="40px" />
Approximation Error Characterization. Suppose $f :[a,b] \rightarrow \R$ is bounded. Then $f$ is integrable on $[a , b]$ iff for every $\varepsilon >0$, there exists a partition $P \in \text{Part}(a, b)$, s.t.
$$ U(P, f) - L(P, f) <\varepsilon $$