Documentation

TauCeti.NumberTheory.Padics.PadicValRat

Vanishing of the p-adic valuation of a rational number #

This file characterises when the p-adic valuation of a nonzero rational number vanishes, and compares the valuations of two rational numbers with sum 1.

Main results #

theorem padicValRat.eq_zero_iff {p : ℕ} [hp : Fact (Nat.Prime p)] {q : ℚ} (hq : q ≠ 0) :

A nonzero rational number has p-adic valuation zero exactly when the prime p divides neither its numerator nor its denominator.

theorem padicValRat.eq_zero_of_add_eq_one_of_pos {p : ℕ} [Fact (Nat.Prime p)] {x y : ℚ} (hxy : x + y = 1) (hx : 0 < padicValRat p x) :

If x + y = 1 and x has positive p-adic valuation, then y has p-adic valuation zero.

theorem padicValRat.eq_of_add_eq_one_of_neg {p : ℕ} [Fact (Nat.Prime p)] {x y : ℚ} (hxy : x + y = 1) (hx : padicValRat p x < 0) :

If x + y = 1 and x has negative p-adic valuation, then y has the same p-adic valuation as x.

theorem padicValRat.max_natAbs_eq_of_add_eq_one {p : ℕ} [hp : Fact (Nat.Prime p)] {x y : ℚ} (hxy : x + y = 1) :

If x + y = 1, write x = u / w and y = v / w in lowest terms, with u = x.num, v = y.num and the common denominator w = x.den, so that u + v = w. Then at every prime p the larger of |v_p(x)| and |v_p(y)| is the largest of v_p(u), v_p(v) and v_p(w).