Are strict local minima of a general function always countable? This came up as a question in my last  real analysis test. Speaking to my teacher after the test, he said he'd forget to mention that the function should be continuous, and in fact there is an easy couterexample for his argument when the function is not continuous. Still after thinking for a long time I was unable to come up with a function with uncoutable strict local minima or with a proof that these don't exist.
 A: Let $M$ be the set of strict local minima of a function $f$. Then for every $p\in M$ there is an open interval $(a,b)$ such that $f(p)$ is smaller than $f(x)$ for any $x\in(a,b)\setminus\{p\}$. We can now choose rational numbers $a_p,b_p$ with $a<a_p<p<b_p<b$, and $f(p)$ will be the smallest value on $(a_p,b_p)$.
Define a map $g:M\rightarrow\Bbb Q^2$ taking $p$ to a pair $(a_p,b_p)\in\Bbb Q^2$ like above (we don't need choice; we can choose $(a_p,b_p)$ to be the least working pair in some well-ordering of $\Bbb Q^2$). It's clear $g$ is injection, since $f(x),f(y)$ cannot both be smaller than each other for $x\neq y$. Hence $g$ is an injection into a countable set showing $M$ is countable.
A: The set $T$ of strict local minimum is countable.
Let $S$ be the set of minimum values of $f$. Namely, $$S=\{a \in \mathbb R : a \text{ is a local mimimum value of } f\}$$ I claim that $S$ is countable. For $s \in S$, take an open interval $I_s$ with rational endpoints such that $s =\max \{f(x) : x \in I_s\}$. If $s,t \in S$ and $I_s=I_t$ then $s=t$. Hence, we have built a one-to-one map from $S$ to $\mathbb Q \times \mathbb Q$, proving that $S$ is countable.
Now let $$T=\{x \in \mathbb R : f \text{ has a strict minimum at } x\}.$$ We want to prove that $T$ is countable. If $f$ has a strict minimum at $x$, then $f(x) \in S$. Therefore $$T=\bigcup_{s \in S} f^{-1}(\{s\}).$$ Wewill be done if we prove that for all $s \in S$, $f^{-1}(\{s\})$ is countable as a countable union of countable sets is countable.
For $u \in f^{-1}(\{s\})$, we can find an open interval $J_u$ such with rational coordinates such that for $x \in J_u \setminus \{u\}$ we have $f(x) > f(u)=s$. The map $u \mapsto I_u$ (defined on $f^{-1}(\{s\})$) is injective. Which proves that $f^{-1}(\{s\})$ is countable. Hence $T$ is countable as desired.
