Sard's famous theorem asserts that


**Theorem.** The set of critical values of a smooth function from a manifold to another has Lebesgue measure $0$.


I am asking for the curiosity that is it possible to find such a function whose set of critical values is 


1. Cantor set or
2. Any other uncountably infinite set?



Sard's theorem and Cantor set
It is not hard to construct a smooth function $f$ on $\mathbb R$ such that $f \ge 0$ with $f(x) = 0$ if and only if $x$ is in the Cantor set $E$. If $F$ is an antiderivative of $f$, the critical values of $F$ will be an uncountably infinite perfect set.


