[Math] $\varepsilon$-$\delta$ proof of continuity of floor function $\lfloor x\rfloor$

continuityepsilon-deltaproof-verificationreal-analysis

I would just like to ask someone to confirm or correct the following 'proof' of continuity of the floor function.

Let $\varepsilon>0$ be given. Set $\delta:=\min\lbrace x-\lfloor x\rfloor,\lceil x\rceil-x\rbrace.$ If $f(x):=\lfloor x\rfloor$ for all $x\in\mathbb{R}$ and $x\in\mathbb{R}$ satisfies $0<|x-x_0|<\delta=\min\lbrace x-\lfloor x\rfloor,\lceil x\rceil-x\rbrace$, then the distance between $x$ and $x_0$ is less than the distance between $x$ and the nearest integer to $x$ so that $|f(x)-f(x_0)|=0<\varepsilon.$ Hence the floor function is continuous on $\mathbb{R}.$

First, is the above proof correct? Second, assuming I have not made a silly mistake with the definition of the $\delta$ that I need to correct, is it okay to have a delta which is defined in terms of your original function? If it is not, can somebody please give an example where defining a $\delta$ in such a way leads to a problem? Thanks in advance.

Best Answer

Your $\delta$ is not positive if $x$ is an integer (as then $x = \lfloor x \rfloor = \lceil x \rceil$). It is ok to define $\delta $ in terms of $f$, but you have to check that $\delta > 0$.

Note that your proof works for $x \in \mathbb R - \mathbb Z$, so it proves that $\lfloor.\rfloor\colon \mathbb R -\mathbb Z \to \mathbb Z$ is continuous.

Related Question