# $\varepsilon$-$\delta$ proof of continuity of floor function $\lfloor x\rfloor$

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.

• I didn't read your answer, but it is wrong. You want to prove that $$\forall x_0\in \mathbb R\forall \varepsilon >0\,\exists \delta >0\,\forall x\in \mathbb R\left(|x-x_0|<\delta\implies \left|\lfloor x\rfloor-\lfloor x_0\rfloor\right|\right).$$ So you start out with "let $x_0\in \mathbb R$ and let $\varepsilon >0$". Now you're trying to define $\delta$ as a function of something that doesn't exist, namely $x$. Your $\delta$ can only depend on constants or previously fixed variables (in this case $\varepsilon$ and $x_0$). – Git Gud Jun 11 '14 at 9:07
• @GitGud He just seems to exchange the roles of $x$ and $x_0$. – martini Jun 11 '14 at 9:13
• @martini After my comment I read a little bit more and I don't think the OP does that. The OP says "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$", not even mentioning $x_0$ and quantifying only $x$. Not mentioning what $x_0$ is what people usually do when it's fixed (I think). – Git Gud Jun 11 '14 at 9:16
• How could you even think that the floor function is everywhere continuous? – Christian Blatter Apr 7 '15 at 9:15

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.
• I think you want $\Bbb Z$ in place of $\Bbb N$ here. – Mario Carneiro Apr 6 '15 at 14:04