Spivak says the following function does not have an integral:
$$ F(x) = \left\{ \begin{array}{lr} 1 & : x \in \mathbb{Q}\\ 0 & : x \notin \mathbb{Q} \end{array} \right. $$
It makes sense, for any partition $P$ there will be a $t_i$ and $t_{i+1}$ where there will exist a rational and an irrational between the two, hence $M_{i}$ and $m_i$ (the "supremum partition" and "infimum partition") are always going to to be 1 and 0 respectively. Hence if you take the sum of these different partitions and subtract them from each other (as Spivak writes: $U(F, P) - L(F, P)$) you will always get a $b-a$ where $b$ and $a$ are the upper and lower bounds of the integral respectively.
Therefore, I can define a $\epsilon < a - b$ and I will never be able to make a partition that results in $U(F, P) - L(F, P) < \epsilon$ hence it fails.
It makes sense, but my alternative reasoning comes to the complete opposite conclusion. First of all, Spivak proves the following two properties:
Let $f$ be a function where for every point $x$, $f(x) = 0$ except for exactly one point $a$ where $f(a) = 1$ then $f$ is integrable. Let this kind of function be referred to as a "point function".
Let $f$ and $g$ be 2 integrable functions, then $f + g$ is integrable.
After that I decide to generalize the second theorem:
Lemma:
Let $f, g, h \ldots n$ all be integrable function with signatures of $\mathbb{R} \rightarrow \mathbb{R}$, then $f + g + h + \ldots + n$ is integrable.
Proof:
Base case:
$f + g$ is integrable by the theorem above, now assume it holds true for $f + g + \ldots + m$ then to show it is true, it must work for $f + g + \ldots + m + n$.
$$ f + g + \ldots + m + n $$
Let the integrable function $j$ denote $f + g + \ldots + m$ then we have:
$$ j + n $$
Since $j$ and $n$ are both integrable functions, by Theorem 2 we have shown this works for an arbitrary amount of functions.
Now, let $A$ be the set of all point functions with a rational number. Then: $\sum{A}$ is integrable since we know that all the functions in $A$ are integrable and by the above lemma the some of them all must result in an integrable function. And since:
$$ \sum{A} = F $$
I have shown $F$ is integrable, which it is clearly not. (Also, using my logic you can argue the same for any arbitrary function.) Can someone help me understand where I went wrong?