I'm reading 'Counterexamples in analysis by Bernard Gelbaum' which has this as one the counterexample
Function is defined on $\Bbb{Q}$$\cap$$[0,2]$ which is closed and bounded set

$ f(x) = \begin{cases} 0, & \text{if 0 $\le$ $x$ $\lt$ $\sqrt2$ } \\ 1, & \text{if $\sqrt2$ $\lt$ $x$ $\le$2 } \end{cases}$

I concluded that it is a continuous function since co-domain is {${0,1}$} and $f^{-1}$ {$0$} and $f^{-1}${$1$} are closed in $\Bbb{Q}$$\cap$$[0,2]$ ( i. e. inverse image of closed sets is closed and hence $f$ is continuous ) but I'm facing trouble in proving that it is not uniformly continuous. Please help.

Also author mentioned that field $\Bbb{Q}$ is not complete and hence we can have such example . If possible then please explain this point also.

  • $\begingroup$ If the field was complete (e.g. $\mathbb{R}$) continuous function on a closed bounded interval must be uniformly continuous $\endgroup$ – user160738 Nov 19 '16 at 18:18
  • $\begingroup$ I know this property of complete fields but my question is about fields like $\Bbb{Q}$ which are not complete, why these kind of properties do not hold for such fields. $\endgroup$ – Math_Explorer Nov 19 '16 at 18:25
  • $\begingroup$ Title needs changing. We are not on an interval. Also $\mathbb Q \cap [0,2]$ is not closed in $\mathbb R.$ In what sense is it closed? $\endgroup$ – zhw. Nov 19 '16 at 18:44
  • 1
    $\begingroup$ @zhw. $[0,2] \cap \Bbb Q$ is closed in $\Bbb Q$. :) $\endgroup$ – Error 404 Nov 20 '16 at 3:51
  • $\begingroup$ @zhw. I changed the title. Thanks for noticing it. And as Vikrant Desai has mentioned $[0,2]$$\cap$$\Bbb{Q}$ is closed in $\Bbb{Q}$ . :) $\endgroup$ – Math_Explorer Nov 20 '16 at 5:12

Well some minute points regarding continuity of $f$:

You also need to verify that inverse image of all the opens sets viz.$\{\{0\},\{1\},\{0,1\},\emptyset\}$ are all open .

Regarding uniform continuity of $f$:

Since $\Bbb Q$ is dense ,there exists a sequence $x_n\in [0,\sqrt 2]\cap \Bbb Q$ such that $x_n\to \sqrt 2\implies |x_n-\sqrt 2|<\frac{1}{n}\forall n$.

Similarly since $\Bbb Q$ is dense ,there exists a sequence $y_n\in [\sqrt 2,2]\cap \Bbb Q$ such that $y_n\to \sqrt 2\implies |\sqrt 2-y_n|<\frac{1}{n}\forall n$.

Hence $|x_n-y_n|\le |x_n-\sqrt 2|+|\sqrt 2-y_n|\le \frac{1}{n}\forall n$ but $|f(x_n)-f(y_n)|=1$.

NOTE:Since $\Bbb Q$ is not complete hence it has gaps and always such an example is available

| cite | improve this answer | |
  • 2
    $\begingroup$ Thank you so much for pointing out those minute points about continuity. I think each of the set in { {$0$}, {$1$}, {$0$,$1$},$\phi$ } is both open and closed, and their inverse images are also both open and closed in $\Bbb{Q}$ $\cap$ $[0,2]$ ( by subspace topology). I understood your explanation about uniform continuity. You mentioned that always such examples are available for $\Bbb{Q}$. Can you please share the link of any such example which shows properties of complete fields are not valid for fields which are not complete. :) $\endgroup$ – Math_Explorer Nov 20 '16 at 5:37
  • $\begingroup$ Extremely sorry but I don't have a link to share at this moment. $\endgroup$ – Learnmore Nov 20 '16 at 5:41
  • $\begingroup$ Okay ! No problem ! I was curious to know the results which are valid only for complete field and not for fields like $\Bbb{Q}$. :p $\endgroup$ – Math_Explorer Nov 20 '16 at 5:45
  • $\begingroup$ Well you can do one thing .Just open any book on "Metric Spaces" and read the chapter titled "Completeness";I think you will get many properties about Complete Metric Spaces there $\endgroup$ – Learnmore Nov 20 '16 at 5:49
  • $\begingroup$ Thank you ! I will definitely read it . :) $\endgroup$ – Math_Explorer Nov 20 '16 at 6:00

Your proof for continuity is correct.

Suppose $f$ is uniformly continuous.

Let $d$ be the metric on $[0,2] \cap \Bbb Q$ which is induced from usual metric on $\Bbb R.$

Let $\epsilon = \frac 12$. Then $\exists \delta \gt 0$ such that $d(x,y) \lt \delta \implies |f(x)-f(y)| \lt \frac 12 \; \forall x,y \in [0,2] \cap \Bbb Q.$

Now if we take $x \in [0, \sqrt{2}] \cap \Bbb Q$ and $y \in [\sqrt{2},2] \cap \Bbb Q$ such that $d(x,y) \lt \delta$, then $|f(x)-f(y)|=|0-1|=1 \not\lt \frac 12.$

So our assumption that $f$ is uniformly continuous is false.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.