# Equivalence of Definitions of Distance to Nearest Integer Function

## Theorem

The following definitions of the distance to nearest integer function $\norm \cdot: \R \to \closedint 0 {\dfrac 1 2}$ are equivalent:

### Definition 1

$\norm \alpha:= \min \set {\size {n - \alpha}: n \in \Z}$

### Definition 2

$\norm \alpha:= \min \set {\set \alpha, 1 - \set \alpha}$

where $\set \alpha$ is the fractional part of $\alpha$.

## Proof

Let $\alpha \in \R$, $n \in \Z$.

$\floor \alpha \le \alpha < \floor \alpha + 1$

For any $n < \floor \alpha \le \alpha$:

 $\displaystyle \size {n - \alpha}$ $=$ $\displaystyle \alpha - n$ Definition of Absolute Value $\displaystyle$ $>$ $\displaystyle \alpha - \floor \alpha$ $\displaystyle$ $=$ $\displaystyle \size {\alpha - \floor \alpha}$ Definition of Absolute Value

For any $n > \floor \alpha + 1 > \alpha$:

 $\displaystyle \size {n - \alpha}$ $=$ $\displaystyle n - \alpha$ Definition of Absolute Value $\displaystyle$ $>$ $\displaystyle \floor \alpha + 1 - \alpha$ $\displaystyle$ $=$ $\displaystyle \size {\floor \alpha + 1 - \alpha}$ Definition of Absolute Value

Thus:

 $\displaystyle \min \set {\size {n - \alpha}: n \in \Z}$ $=$ $\displaystyle \min \set {\size {\floor \alpha - \alpha}, \size {\floor \alpha + 1 - \alpha} }$ Other $n$'s are disregarded by above $\displaystyle$ $=$ $\displaystyle \min \set {\alpha - \floor \alpha, \floor \alpha + 1 - \alpha}$ $\displaystyle$ $=$ $\displaystyle \min \set {\set \alpha, 1 - \set \alpha}$ Definition of Fractional Part

which shows that the definitions are indeed equivalent.

$\blacksquare$