Documentation

CslibFrontier.Foundations.NumberTheory.Padics.RatValuation

The p-adic valuation of rationals: integers and reduction modulo p ^ n #

Two facts about Rat.padicValuation p. First, valuations of integers below p ^ (a + 1): such a nonzero integer has at most a factors of p (Rat.padicValuation_pow_le_of_abs_lt), so adding p ^ (a + 1) does not change its valuation (Rat.padicValuation_add_pow_of_abs_lt).

Second, reduction modulo p ^ n. The rationals whose denominator is prime to p form the valuation ring ℤ_(p) of Rat.padicValuation p. It embeds in the p-adic integers (Rat.padicIntegerToPadicInt), so it has reductions modulo every power of p (Rat.padicIntegerToZModPow). On a / b with b prime to p, the reduction is a * b⁻¹: it is characterized by Rat.padicIntegerToZModPow_mul_den.

Both serve the integral local coordinates of the Cauchy kernel of [OAI26k] (Lemma D.4, pp. 59–60): the first shows that its grid is a complete residue system for valuations, and the second reduces its ℤ_(2) coefficients modulo the working precision 2 ^ p.

Main definitions #

Main results #

References #

Valuations of integers #

theorem Rat.padicValuation_intCast_of_ne_zero (p : ℕ) [Fact (Nat.Prime p)] {x : ℤ} (hx : x ≠ 0) :

The p-adic valuation of a nonzero integer.

theorem Rat.padicValuation_pow_self (p : ℕ) [Fact (Nat.Prime p)] (k : ℕ) :
(padicValuation p) (↑p ^ k) = WithZero.exp (-↑k)

The p-adic valuation of a power of p.

theorem Rat.padicValuation_pow_le_of_abs_lt {p : ℕ} [Fact (Nat.Prime p)] {a : ℕ} {x : ℤ} (hx : x ≠ 0) (hlt : |x| < ↑p ^ (a + 1)) :
(padicValuation p) (↑p ^ a) ≤ (padicValuation p) ↑x

A nonzero integer below p ^ (a + 1) in absolute value has at most a factors of p.

theorem Rat.padicValuation_add_pow_of_abs_lt {p : ℕ} [Fact (Nat.Prime p)] {a : ℕ} {x : ℤ} (hx : x ≠ 0) (hlt : |x| < ↑p ^ (a + 1)) :
(padicValuation p) (↑x + ↑p ^ (a + 1)) = (padicValuation p) ↑x

Adding p ^ (a + 1) to a nonzero integer below it in absolute value keeps its valuation.

Reduction modulo p ^ n #

The inclusion of the p-integral rationals ℤ_(p) in the p-adic integers.

@[simp]
theorem Rat.coe_padicIntegerToPadicInt (p : ℕ) [Fact (Nat.Prime p)] (x : ↥(padicValuation p).integer) :
↑((padicIntegerToPadicInt p) x) = ↑↑x
noncomputable def Rat.padicIntegerToZModPow (p : ℕ) [Fact (Nat.Prime p)] (n : ℕ) :

Reduction of the p-integral rationals modulo p ^ n.

The reductions are compatible: reducing modulo p ^ n and then modulo p ^ m, m ≤ n, is reducing modulo p ^ m.

theorem Rat.padicIntegerToZModPow_mul_den (p : ℕ) [Fact (Nat.Prime p)] (n : ℕ) (x : ↥(padicValuation p).integer) :
(padicIntegerToZModPow p n) x * ↑(↑x).den = ↑(↑x).num

The reduction of a / b is a * b⁻¹: multiplied by the denominator it gives the numerator.