I am studying for a final exam and have come across the following old exam question: Prove that any countable set of real numbers is the set of points of discontinuity of some monotone function.
The proof I gave is as follows:
Let $X$ be a countable set of real numbers. Let $\{r_n\}_{n \in \mathbb{N}}$ be an enumeration of $X$, such that $r_n < r_{n+1}$. Define $$f(x) = \begin{cases} r_n & x \in [r_n, r_{n+1}) \\ x & (x<r_1) \text{ or } (r_n < x \forall n).\end{cases}$$ Then for all real $x \not \in X$, $f$ is continuous at $x$ and discontinuous at $r_n$. Moreover, it is clear that $f$ is monotone by our choice of enumeration of $X$. Q.E.D.
After looking online to confirm my answer, I came across two things which left me confused. First, this StackExchange post: Can I always order a countable set of numbers. This post seems to say "I am given an enumeration, and I would like to order it" which is shown to be impossible. I believe this contrasts to my approach because I am taking an enumeration which is already ordered, instead of taking an arbitrary enumeration which is then ordered. But I could see the argument to be made that since the ordered enumeration is a permutation of any other enumeration that they are the same thing, and thus a well-ordering of $X$ is not guaranteed to exist. I think that is wrong because $X \subseteq \mathbb{R}$ so there is at least the well-ordering induced by $\mathbb{R}$. Is anyone able to confirm/deny this logic?
Second, I came across Froda's theorem. I think that the question statement is the converse of Froda's theorem, but I am unsure if it is the converse or if it is the same statement in disguise. I realize that it is kind of a dumb question to ask, but what is the relationship between Froda's theorem and this question?
Thanks for any help!