transfinite arithmetic, cardinal arithmetic, ordinal arithmetic
prime field, p-adic integer, p-adic rational number, p-adic complex number
arithmetic geometry, function field analogy
The floor and ceiling of a real number are integers, the result of rounding the real number down or up (respectively). When viewed as functions from $\mathbb{R}$ to itself (or to $\mathbb{Z}$), these are standard examples of functions exhibiting partial notions of continuity: the floor function is both right-continuous? and upper semicontinuous, while the ceiling function is both left-continuous? and lower semicontinuous. They are step functions used to approximate definite integrals of continuous maps and otherwise to relate integrals and series. They provide convenient notation to express various notions of rounding?. From the perspective of order theory, the maps may be seen as the right adjoint and left adjoint (respectively) of the inclusion map from $\mathbb{Z}$ to $\mathbb{R}$.
Given a real number $x$, the floor of $x$, denoted $\lfloor{x}\rfloor$ or $[x]$, is the largest integer $n$ such that $n \leq x$, and the ceiling of $x$, denoted $\lceil{x}\rceil$, is the smallest integer $n$ such that $n \geq x$.
Typically the notation $\lfloor{x}\rfloor$ is used when both floor and ceiling appear, but $[x]$ is often easier when only the floor is considered. Since
this is not actually a restriction.
The floor of $x$ is also called the integer part of $x$, and then one refers as well to the fractional part of $x$, denoted $\{x\}$, defined by
One must of course prove that the floor of $x$ exists; this fails in constructive mathematics, although the floor of $x$ exists for almost all $x$, and all of these functions can still be defined as continuous maps between appropriate locales.
We discuss how the floor and celing functions are left and right adjoint functors to the inclusion of the integers into the real numbers, if both are regarded as posets, and hence as categories.
(preordered sets as thin categories)
Let $(S, \leq)$ be a preordered set. Then this induces a small category whose set of objects is $S$, and which has precisely one morphism $x \to y$ whenever $x \leq y$, and no such morphism otherwise:
Conversely, every small category with at most one morphism from any object to any other, called a thin category, induces on its set of objects the structure of a partially ordered set via (1).
Here the axioms for preordered sets and for categories match as follows:
$\phantom{A}$reflexivity$\phantom{A}$ | $\phantom{A}$transitivity$\phantom{A}$ | |
---|---|---|
$\phantom{A}$partially ordered sets$\phantom{A}$ | $\phantom{A}$ $x \leq x$ $\phantom{A}$ | $\phantom{A}$ $(x \leq y \leq z) \Rightarrow (x \leq z)$ $\phantom{A}$ |
$\phantom{A}$thin categories$\phantom{A}$ | $\phantom{A}$identity morphisms$\phantom{A}$ | $\phantom{A}$composition$\phantom{A}$ |
(floor and ceiling as adjoint functors)
Consider the canonical inclusion
of the integers into the real numbers, both regarded as preorders in the standard way (“lower or equal”). Regarded as full subcategory-inclusion of the corresponding thin categories, via Example , this inclusion functor has both a left and right adjoint functor:
the left adjoint to $\iota$ is the ceiling function
the right adjoint to $\iota$ is the floor function
Hence this induces an adjoint modality, as discussed there.
The adjunction unit and adjunction counit express that each real number is in between its floor and ceiling
Hence the modal objects in both cases are the integers among the real numbers, while every real number is ceiling-submodal and floor-supmodal.
First of all, observe that we indeed have functors
since floor and ceiling preserve the ordering relation.
Now in view of the identification of preorders with thin categories in Example , the hom-isomorphism defining adjoint functors of the form $\iota \dashv \lfloor(-)\rfloor$ says for all $n \in \mathbb{Z}$ and $x \in \mathbb{R}$, that we have
This is clearly already the defining condition on the floor function $\lfloor x \rfloor$.
Similarly, the hom-isomorphism defining adjoint functors of the form $\lceil(-)\rceil \dashv \iota$ says that for all $n \in \mathbb{Z}$ and $x \in \mathbb{R}$, we have
This is evidently already the defining condition on the floor function $\lfloor x \rfloor$.
Notice that in both cases the condition of a natural isomorphism in both variables, as required for an adjunction, is automatically satisfied: For let $x \leq x'$ and $n' \leq n$, then naturality means, again in view of the identifications in Example , that
where the logical implications are equivalently functions between sets that are either empty or singletons. But Functions between such sets are unique, when they exist.
Wikipedia summarizes the basic properties:
Chapter 6 of these notes uses the floor and ceiling functions throughout to relate integrals and series when teaching infinitesimal calculus:
Last revised on August 29, 2018 at 00:05:13. See the history of this page for a list of all contributions to it.