transfinite arithmetic, cardinal arithmetic, ordinal arithmetic
prime field, p-adic integer, p-adic rational number, p-adic complex number
arithmetic geometry, function field analogy
By the floor and ceiling of a real number one means the integers, obtained by rounding the real number down or up, respectively.
When viewed as functions from to itself (or to ), 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 to .
Given a real number , the floor of , denoted or , is the largest integer such that , and the ceiling of , denoted , is the smallest integer such that .
Typically the notation is used when both floor and ceiling appear, but is often easier when only the floor is considered. Since
this is not actually a restriction.
The floor of is also called the integer part of , and then one refers as well to the fractional part of , denoted , defined by
One must of course prove that the floor of exists; this fails in constructive mathematics, although the floor of exists for almost all , and all of these functions can still be defined as continuous maps between appropriate locales. That the floor and ceiling are total functions on the real numbers is equivalent in strength to the analytic LPO; otherwise the floor is a partial function only defined on the half-open intervals for all integers and the ceiling is a partial function only defined on the half-open intervals for all integers .
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 be a preordered set. Then this induces a small category whose set of objects is , and which has precisely one morphism whenever , 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:
reflexivity | transitivity | |
---|---|---|
partially ordered sets | ||
thin categories | identity morphisms | composition |
(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 is the ceiling function
the right adjoint to 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 says for all and , that we have
This is clearly already the defining condition on the floor function .
Similarly, the hom-isomorphism defining adjoint functors of the form says that for all and , we have
This is evidently already the defining condition on the floor function .
Notice that in both cases the condition of a natural isomorphism in both variables, as required for an adjunction, is automatically satisfied: For let and , 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 July 31, 2024 at 22:36:12. See the history of this page for a list of all contributions to it.