Rational numbers at almost every prime #
A rational number has only finitely many primes dividing its numerator or its denominator. Hence
its image in ℚ_[p] is a p-adic integer at all but finitely many primes p, and a nonzero
rational number is a p-adic unit at all but finitely many primes. These are the statements that
make a rational object, such as a rational basis or a rational isometry, integral in every
completion outside a finite set of primes. Conversely, a rational number that is a p-adic integer
at every prime is an integer, and so is a rational number whose denominator is a power of p and
which is a p-adic integer. Consequently two rational numbers agree in ℚ/ℤ when their
difference has p-power denominator and is a p-adic integer.
Main results #
Rat.eventually_not_dvd_den: almost every prime is coprime to the denominator.Padic.eventually_norm_rat_le_one: a rational number isp-adically integral at almost every prime.Padic.eventually_norm_rat_eq_one: a nonzero rational number hasp-adic norm one at almost every prime.Padic.forall_norm_rat_le_one_iff_den_eq_one: a rational number is an integer exactly when it is ap-adic integer at every prime.Padic.den_eq_one_of_pow_mul_eq_of_norm_rat_le_one: ap-adic integer whose product with a power ofpis an integer is an integer.Padic.addCircle_coe_eq_coe_of_eq_add_algebraMap: two rational numbers agree inℚ/ℤwhen their difference hasp-power denominator and lies inℤ_p.
All but finitely many primes do not divide the denominator of a rational number.
A rational number is a p-adic integer at all but finitely many primes p.
A nonzero rational number is a p-adic unit at all but finitely many primes p.
A rational number is an integer, that is, has denominator one, exactly when it is a p-adic
integer at every prime p.
The integer D = ∏_p p ^ k p of a finitely supported family of exponents factors at each
prime p as p ^ k p * D' p, where D' p is a p-adic unit divisible by q ^ k q for
q ≠ p.