Let $x \in A$. Hence {{hypothesis}} we have that both $\left \lfloor{x}\right \rfloor \in A$ and $\left \lceil{x}\right \rceil \in A$. === Necessary Condition === Let $f \left({x}\right) \in \Z$. Let: :$\left \lfloor{f \left({x}\right)}\right \rfloor = \left \lfloor{f \left({\left \lfloor{x}\right \rfloor}\right)}\right \rfloor$ Then: {{begin-eqn}} {{eqn | l = f \left({x}\right)       | r = \left \lfloor{f \left({x}\right)}\right \rfloor       | c = Real Number is Integer iff equals Floor }} {{eqn | r = \left \lfloor{f \left({\left \lfloor{x}\right \rfloor}\right)}\right \rfloor       | c = {{hypothesis}} }} {{end-eqn}} {{AimForCont}} $x \notin \Z$. {{begin-eqn}} {{eqn | l = \left \lfloor{x}\right \rfloor       | o = <       | r = x       | c = Floor of Non-Integer }} {{eqn | ll= \leadsto       | l = f \left({\left \lfloor{x}\right \rfloor}\right)       | o = <       | r = f \left({x}\right)       | c = as $f$ is strictly increasing }} {{eqn | ll= \leadsto       | l = \left \lfloor{f \left({\left \lfloor{x}\right \rfloor}\right)}\right \rfloor       | o = <       | r = \left \lfloor{f \left({x}\right)}\right \rfloor       | c = as $\left \lfloor{f \left({x}\right)}\right \rfloor = f \left({x}\right)$ by Real Number is Integer iff equals Floor }} {{eqn | ll= \leadsto       | l = \left \lfloor{f \left({\left \lfloor{x}\right \rfloor}\right)}\right \rfloor       | o = \ne       | r = \left \lfloor{f \left({x}\right)}\right \rfloor       | c = which contradicts $\left \lfloor{f \left({x}\right)}\right \rfloor = \left \lfloor{f \left({\left \lfloor{x}\right \rfloor}\right)}\right \rfloor$ }} {{end-eqn}} Thus by Proof by Contradiction: :$x \in \Z$ Similarly, let: :$\left \lceil{f \left({x}\right)}\right \rceil = \left \lceil{f \left({\left \lceil{x}\right \rceil}\right)}\right \rceil$ Then: {{begin-eqn}} {{eqn | l = f \left({x}\right)       | r = \left \lceil{f \left({x}\right)}\right \rceil       | c = Real Number is Integer iff equals Ceiling }} {{eqn | r = \left \lceil{f \left({\left \lceil{x}\right \rceil}\right)}\right \rceil       | c = {{hypothesis}} }} {{end-eqn}} {{AimForCont}} $x \notin \Z$. {{begin-eqn}} {{eqn | l = \left \lceil{x}\right \rceil       | o = >       | r = x       | c = Ceiling of Non-Integer }} {{eqn | ll= \leadsto       | l = f \left({\left \lceil{x}\right \rceil}\right)       | o = >       | r = f \left({x}\right)       | c = as $f$ is strictly increasing }} {{eqn | ll= \leadsto       | l = \left \lceil{f \left({\left \lceil{x}\right \rceil}\right)}\right \rceil       | o = >       | r = \left \lceil{f \left({x}\right)}\right \rceil       | c = as $\left \lceil{f \left({x}\right)}\right \rceil = f \left({x}\right)$ by Real Number is Integer iff equals Ceiling }} {{eqn | ll= \leadsto       | l = \left \lceil{f \left({\left \lceil{x}\right \rceil}\right)}\right \rceil       | o = \ne       | r = \left \lceil{f \left({x}\right)}\right \rceil       | c = which contradicts $\left \lceil{f \left({x}\right)}\right \rceil = \left \lceil{f \left({\left \lceil{x}\right \rceil}\right)}\right \rceil$ }} {{end-eqn}} Thus by Proof by Contradiction: :$x \in \Z$ Thus: :$\forall x \in A: \left \lfloor{f \left({x}\right)}\right \rfloor = \left \lfloor{f \left({\left \lfloor{x}\right \rfloor}\right)}\right \rfloor \implies \left(f \left({x}\right) \in \Z \implies x \in \Z)\right)$ and: :$\forall x \in A: \left \lceil{f \left({x}\right)}\right \rceil = \left \lceil{f \left({\left \lceil{x}\right \rceil}\right)}\right \rceil \implies \left(f \left({x}\right) \in \Z \implies x \in \Z)\right)$ {{qed|lemma}} === Sufficient Condition === Let $f$ be such that: :$f \left({x}\right) \in \Z \implies x \in \Z$ {{AimForCont}} there exists $x \in A$ such that: :$\left \lfloor{f \left({x}\right)}\right \rfloor \ne \left \lfloor{f \left({\left \lfloor{x}\right \rfloor}\right)}\right \rfloor$ We have by definition of the floor function that $x \ge \left \lfloor{x}\right \rfloor$. As $f$ is strictly increasing, it cannot be the case that $\left \lfloor{f \left({x}\right)}\right \rfloor < \left \lfloor{f \left({\left \lfloor{x}\right \rfloor}\right)}\right \rfloor$. So it must be that: :$\left \lfloor{f \left({\left \lfloor{x}\right \rfloor}\right)}\right \rfloor < \left \lfloor{f \left({x}\right)}\right \rfloor$ Because $f$ is continuous: :$\exists y \in A: \left \lfloor{x}\right \rfloor < y \le x$ such that $f \left({y}\right) \in \Z$ But by definition of the floor function, $y$ cannot be an integer. Thus by Proof by Contradiction: :$\left({f \left({x}\right) \in \Z \implies x \in \Z}\right) \implies \left \lfloor{f \left({x}\right)}\right \rfloor = \left \lfloor{f \left({\left \lfloor{x}\right \rfloor}\right)}\right \rfloor$ {{qed|lemma}} {{AimForCont}}, similarly, that there exists $x \in A$ such that: :$\left \lceil{f \left({x}\right)}\right \rceil \ne \left \lceil{f \left({\left \lceil{x}\right \rceil}\right)}\right \rceil$ We have by definition of the ceiling function that $x \le \left \lceil{x}\right \rceil$. As $f$ is strictly increasing, it cannot be the case that $\left \lceil{f \left({x}\right)}\right \rceil > \left \lceil{f \left({\left \lceil{x}\right \rceil}\right)}\right \rceil$. So it must be that: :$\left \lceil{f \left({\left \lceil{x}\right \rceil}\right)}\right \rceil > \left \lceil{f \left({x}\right)}\right \rceil$ Because $f$ is continuous: :$\exists y \in A: \left \lceil{x}\right \rceil > y \ge x$ such that $f \left({y}\right) \in \Z$ But by definition of the ceiling function, $y$ cannot be an integer. Thus by Proof by Contradiction: :$\left({f \left({x}\right) \in \Z \implies x \in \Z}\right) \implies \left \lceil{f \left({x}\right)}\right \rceil = \left \lceil{f \left({\left \lceil{x}\right \rceil}\right)}\right \rceil$ {{qed|lemma}} Thus we have: :$\left({f \left({x}\right) \in \Z \implies x \in \Z}\right) \iff \left \lfloor{f \left({x}\right)}\right \rfloor = \left \lfloor{f \left({\left \lfloor{x}\right \rfloor}\right)}\right \rfloor$ and :$\left({f \left({x}\right) \in \Z \implies x \in \Z}\right) \iff \left \lceil{f \left({x}\right)}\right \rceil = \left \lceil{f \left({\left \lceil{x}\right \rceil}\right)}\right \rceil$ Hence the result. {{qed}} {{Namedfor|Robert James McEliece|cat = McEliece}}