Rational numbers
Context
Arithmetic
number theory
number
- natural number, integer number, rational number, real number, irrational number, complex number, quaternion, octonion, adic number, cardinal number, ordinal number, surreal number
arithmetic
arithmetic geometry, function field analogy
Arakelov geometry
Algebra
Rational numbers
Definition
A rational number is a fraction of two integer numbers.
As a field
The field of rational numbers, , is the field of fractions of the commutative ring of integers, , hence the field consisting of formal fractions (“ratios”) of integers.
As a commutative ring
Let be the set of positive integers. The positive integers are embedded into every commutative ring : there is an injection such that and for all .
Suppose has an injection such that and for all . Then is called a -algebra, and the commutative ring of rational numbers is the initial commutative -algebra.
It can then be proven from the ring axioms and the properties of the integers that every rational number apart from zero and has a multiplicative inverse, making a field.
As an sequential colimit in CRing
Let be the localization of the integers away from the factorial , and for each , there is a unique commutative ring homomorphism defined by the universal property of localisation of away from . Then the commutative ring of rational numbers is the sequential colimit of the diagram
As an abelian group
Let be the set of positive integers and let be the free abelian group on the set .
Let be an abelian group containing as an abelian subgroup. The positive integers are embedded into the function abelian group , with being the identity function on ; i.e. there is an injection such that and for all .
Suppose has an injection such that for all , and . Then the abelian group of rational numbers is the initial such abelian group.
As an initial object in a category
Let be the integers and let
be the set of integers apart from zero.
For lack of a better name, let us define a set with rational numbers to be a set with a function with domain the Cartesian product and codomain , such that
A homomorphism of sets with rational numbers between two sets with rational numbers and is a function such that
The category of sets with rational numbers is the category whose objects are sets with rational numbers and whose morphisms for sets with rational numbers , are homomorphisms of sets with rational numbers. The set of rational numbers, denoted , is defined as the initial object in the category of sets with rational numbers.
In dependent type theory
In dependent type theory, there are multiple different definitions of the type of rational numbers.
As a dependent sum type
Let be the integers, let
be the non-zero integers, and let be the greatest common divisor on the integers. Then the rational numbers is defined as the type of pairs of integers and non-zero integers such that the greatest common divisor is equal to one:
We define the function for all integers and non-zero integers by
where is the witness that the greatest common divisor of and is equal to 1, and is integer division, since integers are an Euclidean domain and thus have a division and remainder operation.
As a higher inductive type
In homotopy type theory, the type of rational numbers, denoted , is defined (UBP13, §11.1) as the higher inductive type generated by:
-
A function , where
-
A dependent product of functions between identities representing that equivalent fractions are equal:
-
A set-truncator
Properties
Let be the inclusion of the non-zero integers into the integers.
Commutative ring structure on the rational numbers
Definition
The rational number zero is defined as
Definition
The binary operation addition is defined as
for , , , .
Proposition
For any and , .
Definition
The unary operation negation is defined as
for ,
Definition
The binary operation subtraction is defined as
for , , ,
Definition
The rational number one is defined as
Definition
The binary operation multiplication is defined as
for , , ,
Definition
The right -action exponentiation is defined as
for , , .
This makes the rational numbers into a commutative ring.
Order structure on the rational numbers
Definition
The predicate is positive, denoted as , is defined as
for , .
Definition
The predicate is negative, denoted as , is defined as
for , .
Definition
The predicate is zero, denoted as , is defined as
for , .
Definition
The predicate is non-positive, denoted as is defined as
for , .
Definition
The predicate is non-negative, denoted as , is defined as
for , .
Definition
The predicate is non-zero, denoted as , is defined as
for , .
Definition
The relation is less than, denoted as , is defined as
for , .
Definition
The dependent type is greater than, denoted as , is defined as
for , .
Definition
The dependent type is apart from, denoted as , is defined as
for , .
Definition
The dependent type is less than or equal to, denoted as , is defined as
for , .
Definition
The dependent type is greater than or equal to, denoted as , is defined as
for , .
Pseudolattice structure on the rational numbers
Definition
The ramp function is defined as
for , , .
Definition
The minimum is defined as
for , .
Definition
The maximum is defined as
for , .
Definition
The absolute value is defined as
for .
Definition
The metric is defined as
for , .
We define the ternary relation for , , and , called “ and are within a distance of ”. One could show that the rational numbers are a uniform space with respect to the uniformity ternary relation .
-
For every and ,
-
For every , , and , , and implies that .
-
For every , and , implies that .
-
For every , , if and only if .
-
For every , and , , implies that and .
-
For every , and , , and implies that .
Algebraic closure
The algebraic closure of the rational numbers is called the field of algebraic numbers. The absolute Galois group has some curious properties, see there.
Topologies
There are several interesting topologies on that make into a topological group under addition, allowing us to define interesting fields by taking the completion with respect to this topology:
-
The discrete topology is the most obvious, which is already complete.
-
The absolute-value topology is defined by the metric ; the completion is the field of real numbers. The rational numbers are thus a Hausdorff space.
(This topology is totally disconnected (this exmpl.))
-
Fixing a prime number , the -adic topology is defined by the ultrametric where is the highest exponent on in the prime factorization of ; the completion is the field of -adic numbers.
According to Ostrowski's theorem this are the only possibilities.
Interestingly, (2) cannot be interpreted as a localic group, although the completion can. (Probably the same holds for (3); I need to check.)
Analysis
One could analytically define the concepts of limit of a function and continuous function with respect to the absolute-value topology, and prove that the limit of a function satisfy the algebraic limit theorem. Since the reciprocal function on the rational numbers is well defined for non-zero rational numbers , given a continuous function for open interval the difference quotient function exists and thus the derivative is well-defined for continuous functions. One could thus define smooth functions on the rational numbers, and because the rational numbers are a Hausdorff space, analytic functions on the rational numbers, despite the fact that the rational numbers are a totally disconnected space.
For example,
One could show that any open interval, half-open interval, and closed interval in the rational numbers is a rational metric space, with its metric inherited from the Euclidean metric on the rational numbers . Thus one could do analysis with partial functions in the rational numbers, such as the reciprocal function and the rational functions on the rational numbers.
Then, given a rational metric space :
-
if it exists, the (Weierstrass) limit of a function from to the rational numbers approaching an element is a rational number with a function on the positive rational numbers such that for all positive rational numbers and for all elements , implies
-
similarly, if it exists, the (Bourbaki) limit of a function from to the rational numbers approaching an element is a rational number with a function on the positive rational numbers such that for all positive rational numbers and for all elements , implies
-
a pointwise continuous function from to the rational numbers is a function with a function from to the set of endofunctions on the positive rational numbers such that for all positive rational numbers and for all rational numbers and , implies that .
-
a uniformly continuous function from to the rational numbers is a function with a function on the positive rational numbers such that for all positive rational numbers and for all elements numbers and , implies that .
Now, given an injection , so that is a subset of the rational numbers,
-
a pointwise differentiable function from to the rational numbers is a function with a derivative function on the rational numbers and a function from to the set of endofunctions on the positive rational numbers such that for all positive rational numbers and for all elements and , implies that
-
a uniformly differentiable function from to the rational numbers is a function with a derivative function on the rational numbers and a function on the positive rational numbers such that for all positive rational numbers and for all elements and , implies that
-
a smooth function in rational numbers is a function with a sequence of functions and a sequence of functions in the positive rational numbers, such that
-
for every element ,
-
for every natural number , for every positive rational number , for every rational number such that , and for every rational number ,
Alternatively, we could use infinitesimals. Let be the dual rational numbers, and let be the commutative ring of formal power series on the rational numbers. The former is equivalent to the product and the latter is equivalent to the function set .
Both of these are commutative rational algebras with ring homomorphism and .
- A function is differentiable if it has a function such that and a function such that for all elements ,
- A function is smooth if it has a function such that and a sequence of functions with for all , such that for all natural numbers
References
See also:
Discussion in univalent foundations of mathematics (homotopy type theory with the univalence axiom):
and specifically in Agda: