Riemann integrable function is bounded, without any type of choice I know a proof that Riemann integrable positive function $f$ defined on $[a,b]$ is bounded.

Suppose $f\geq 0$ is unbounded. First, for each $n$, choose a point $a_n$ in $[a,b]$ such that $f(a_n) > n$. Let $a$ be an arbitrary positive real number. Choose $n$ with $a > \frac1n$, and we can have a partition $p$ with each interval length bigger than $\frac1n$ while mesh($p$) $< a$. Then $R(f, p) > f(a_{n^2}) \frac1n = n$  so the Riemann sums do not tend to a finite limit.

But I think while we choose $a_n$ in the first step, countable choice is used. Are there any other ways to prove it without using some kind of choice, since this is a very 'basic' theorem in 'elementary 'analysis so it seems weird that it requires some kind of choice axiom.
 A: You don't have to choose the whole sequence in advance. We assumed that $f$ is unbounded, so for any given $n$ we can find $x$ such that $f(x) > n^2$, that's just part of the definition.
Now for any fixed $a$ pick a suitable $n$, and $x$ such that $f(x)>n^2$, etc. We are really using the whole sequence here. It's a proof of convenience.
A: Suppose $f:[a,b]\to\mathbb{R}$ is Riemann integrable but assume $f$ is unbounded. Let $I_R=\int_{a}^{b}f$, which is also defined as $\lim_{||P||\to 0}R(f,P,x^*)$, where $P=\{a=t_0<t_1<...<t_n=b\}$ is a partition of $[a,b]$ and $x^*$ is a compatible n-tuple with $P$, that is, $x_i^*\in[t_{i-1},t_i]$ for all $1\leq i\leq n$. Also, $||P||$ is the norm of $P$, which is the maximum of $t_i-t_{i-1}$.
Since $f$ is integrable, then for all $\varepsilon>0$, there exists a $\delta>0$ such that for all partitions $P$ with $||P||<\delta$, then $|R(f,P,x^*)-I_R|<\varepsilon$.
Consider the particular choice $\varepsilon=57$. Then there exists a $\delta>0$ such that for all partitions $P$ with $||P||<\delta$, we have $|R(f,P,x^*)-I_R|<57$.
If $x^*$ and $z^*$ are compatible with $P$, then we have $$\begin{align*}|R(f,P,x^*)-R(f,P,z^*)|&= |R(f,P,x^*)-I_R+I_R-R(f,P,z^*)|\\&\leq|R(f,P,x^*)-I_R|+|I_R-R(f,P,z^*)|\\&<114\end{align*}$$
This is a set up for the following, where we will redefine $x^*$ and $z^*$.
By the Archimedean property, choose $n\in\mathbb{N}$ such that $P_n$ is a regular partition of $[a,b]$ so that if $P_n=\{a=t_0<t_1<...<t_n=b\}$, then $t_i-t_{i-1}=\frac{b-a}{n}$ and $||P_n||<\delta$.
Suppose $x^*$ is compatible with $P_n$. Since $f$ is unbounded, then there exists some $j\in\mathbb{N}$ with $1\leq j\leq n$ such that $f|_{[t_{j-1},t_j]}:[t_{j-1},t_j]\to\mathbb{R}$ is unbounded.
In particular, there exists a $z_j\in[t_{j-1},t_j]$ such that $|f(z_j)-f(x_j^*)|>\frac{570n}{b-a}$.
Now, define $z^*$ as $x_i^*$ if $i\neq j$ and $z_j$ if $i=j$. Then we have $$\begin{align*}|R(f,P_n,x*)-R(f,P_n,z^*)|&=\big|\sum_{i=1}^{n}f(x_i^*)(t_i-t_{i-1})-\sum_{i=1}^n f(z_i^*)(t_i-t_{i-1})\big|\\&=|[f(x_j^*)-f(z_j)](t_j-t_{j-1})|\\&>\frac{570n}{b-a}\cdot\frac{b-a}{n}\\&=570 \end{align*} $$
However, we have shown that this quantity should be less than $114$, therefore we have reached a contradiction. Thus $f$ must be bounded.
