How does a refinement solve the problem of the Riemann sums varying a lot as we vary the partition? I am reading The Way of Analysis by Strichartz.
In the Integration section, he explains how we are able to make the upper and lower Riemann sums close to each other for a fixed partition (by using the uniform continuity of $f$ on a closed interval), but it is still conceivable that the values of these Riemann sums vary a lot as we vary the partition. So we introduce the concept of refinement. We can further partition an existing partition.
How does a refinement solve the problem of the Riemann sums varying a lot as we vary the partition? How are we controlling other partitions if we are only refining one particular partition?
 A: You may be interested in the notion of a net: a generalization of sequences that allows for limits to be taken even in circumstances where there isn't a single linear sequence of items. The key notion is that a net is a function on a directed set: that is, a set with a relation $\leq$ that's reflexive ($a\leq a$), transitive ($a\leq b$ and $b\leq c$ implies that $a\leq c$), and that satisfies the upper bound property (or that 'coheres') : for all $a$ and $b$, there's a $c$ with $a\leq c$ and $b\leq c$.
This idea matters because we can define the notion of a limit on a directed set: let $S$ be a directed set and $f():S\mapsto\mathbb{R}$ be a (for convenience, real-valued) function on it. We can define $\lim_S f()=L$ if for every $s\in S$ and every $\epsilon$, there's a $t$ with $s\leq t$ and such that for all $w$ with $t\leq w$, $|f(w)-L|\lt_{\mathbb{R}}\epsilon$. (Here the last $\lt_{\mathbb{R}}$ is meant to refer to the order relation on the reals.)  Note that this generalizes the notion of $\lim_{x\to\infty} f(x)$, because the reals form a directed set using the usual notion of $\leq$, and if you unwind the definition here in that case you'll see that it's equivalent to the usual one.
So why does this matter to integration? Because partitions of an interval form a directed set, where given two partitions $p_A$ and $p_B$, we define $p_A\leq p_B$ to mean that $p_B$ is a refinement of $p_A$ (i.e., that each interval in $p_A$ is a union of a finite number of intervals in $p_B$).  It's clear that every partition is a refinement of itself, and that if $p_B$ is a refinement of $p_A$ and $p_C$ is a ('further') refinement of $p_B$, then $p_C$ is also a refinement of $p_A$.  What's more, given any two partitions $p_A$ and $p_B$ they have a common refinement $p_{AB}$: just take as the intervals of $p_{AB}$ all (non-trivial) intersections of intervals in $p_A$ with intervals in $p_B$. (For instance, if our domain of integration is $(0,1)$ and we set $p_A=(0,\frac12)\cup(\frac12,1)$ and $p_B=(0,\frac13)\cup(\frac13,\frac23)\cup(\frac23,1)$ — please note that I'm being a bit sloppy about endpoints — then $p_{AB}=(0,\frac13)\cup(\frac13,\frac12)\cup(\frac12,\frac23)\cup(\frac23,1)$.)
So because partitions form a directed set, we can attempt to take limits on it; in particular, we can attempt to take the limit of the upper Riemann sums over the net of partitions of our domain, and the limit of the lower Riemann sums, and under sufficient niceness assumptions we can show that both these limits exist and are equal.
