File: Mathlib/NumberTheory/Padics/PadicNorm.lean

full_name: padicNorm
code: /-- If `q ≠ 0`, the `p`-adic norm of a rational `q` is `p ^ (-padicValRat p q)`.
If `q = 0`, the `p`-adic norm of `q` is `0`. -/
def padicNorm (p : ℕ) (q : ℚ) : ℚ 
goal: ℚ

full_name: padicNorm.eq_zpow_of_nonzero
code: /-- Unfolds the definition of the `p`-adic norm of `q` when `q ≠ 0`. -/
@[simp]
protected theorem eq_zpow_of_nonzero {q : ℚ} (hq : q ≠ 0) :
    padicNorm p q = (p : ℚ) ^ (-padicValRat p q) 
goal: padicNorm p q = ↑p ^ (-padicValRat p q)

full_name: padicNorm.nonneg
code: /-- The `p`-adic norm is nonnegative. -/
protected theorem nonneg (q : ℚ) : 0 ≤ padicNorm p q 
goal: 0 ≤ padicNorm p q

full_name: padicNorm.zero
code: /-- The `p`-adic norm of `0` is `0`. -/
@[simp]
protected theorem zero : padicNorm p 0 = 0 
goal: padicNorm p 0 = 0

full_name: padicNorm.one
code: /-- The `p`-adic norm of `1` is `1`. -/
-- @[simp] -- Porting note (#10618): simp can prove this
protected theorem one : padicNorm p 1 = 1 
goal: padicNorm p 1 = 1

full_name: padicNorm.padicNorm_p
code: /-- The `p`-adic norm of `p` is `p⁻¹` if `p > 1`.

See also `padicNorm.padicNorm_p_of_prime` for a version assuming `p` is prime. -/
theorem padicNorm_p (hp : 1 < p) : padicNorm p p = (p : ℚ)⁻¹ 
goal: padicNorm p ↑p = (↑p)⁻¹

full_name: padicNorm.padicNorm_p_of_prime
code: /-- The `p`-adic norm of `p` is `p⁻¹` if `p` is prime.

See also `padicNorm.padicNorm_p` for a version assuming `1 < p`. -/
@[simp]
theorem padicNorm_p_of_prime [Fact p.Prime] : padicNorm p p = (p : ℚ)⁻¹ 
goal: padicNorm p ↑p = (↑p)⁻¹

full_name: padicNorm.padicNorm_of_prime_of_ne
code: /-- The `p`-adic norm of `q` is `1` if `q` is prime and not equal to `p`. -/
theorem padicNorm_of_prime_of_ne {q : ℕ} [p_prime : Fact p.Prime] [q_prime : Fact q.Prime]
    (neq : p ≠ q) : padicNorm p q = 1 
goal: padicNorm p ↑q = 1

full_name: padicNorm.padicNorm_p_lt_one
code: /-- The `p`-adic norm of `p` is less than `1` if `1 < p`.

See also `padicNorm.padicNorm_p_lt_one_of_prime` for a version assuming `p` is prime. -/
theorem padicNorm_p_lt_one (hp : 1 < p) : padicNorm p p < 1 
goal: padicNorm p ↑p < 1

full_name: padicNorm.padicNorm_p_lt_one_of_prime
code: /-- The `p`-adic norm of `p` is less than `1` if `p` is prime.

See also `padicNorm.padicNorm_p_lt_one` for a version assuming `1 < p`. -/
theorem padicNorm_p_lt_one_of_prime [Fact p.Prime] : padicNorm p p < 1 
goal: padicNorm p ↑p < 1

full_name: padicNorm.values_discrete
code: /-- `padicNorm p q` takes discrete values `p ^ -z` for `z : ℤ`. -/
protected theorem values_discrete {q : ℚ} (hq : q ≠ 0) : ∃ z : ℤ, padicNorm p q = (p : ℚ) ^ (-z) 
goal: ∃ z, padicNorm p q = ↑p ^ (-z)

full_name: padicNorm.neg
code: /-- `padicNorm p` is symmetric. -/
@[simp]
protected theorem neg (q : ℚ) : padicNorm p (-q) = padicNorm p q 
goal: padicNorm p (-q) = padicNorm p q

full_name: padicNorm.nonzero
code: /-- If `q ≠ 0`, then `padicNorm p q ≠ 0`. -/
protected theorem nonzero {q : ℚ} (hq : q ≠ 0) : padicNorm p q ≠ 0 
goal: padicNorm p q ≠ 0

full_name: padicNorm.zero_of_padicNorm_eq_zero
code: /-- If the `p`-adic norm of `q` is 0, then `q` is `0`. -/
theorem zero_of_padicNorm_eq_zero {q : ℚ} (h : padicNorm p q = 0) : q = 0 
goal: q = 0

full_name: padicNorm.mul
code: /-- The `p`-adic norm is multiplicative. -/
@[simp]
protected theorem mul (q r : ℚ) : padicNorm p (q * r) = padicNorm p q * padicNorm p r 
goal: padicNorm p (q * r) = padicNorm p q * padicNorm p r

full_name: padicNorm.div
code: /-- The `p`-adic norm respects division. -/
@[simp]
protected theorem div (q r : ℚ) : padicNorm p (q / r) = padicNorm p q / padicNorm p r 
goal: padicNorm p (q / r) = padicNorm p q / padicNorm p r

full_name: padicNorm.of_int
code: /-- The `p`-adic norm of an integer is at most `1`. -/
protected theorem of_int (z : ℤ) : padicNorm p z ≤ 1 
goal: padicNorm p ↑z ≤ 1

full_name: _private.Mathlib.NumberTheory.Padics.PadicNorm.0.padicNorm.nonarchimedean_aux
code: private theorem nonarchimedean_aux {q r : ℚ} (h : padicValRat p q ≤ padicValRat p r) :
    padicNorm p (q + r) ≤ max (padicNorm p q) (padicNorm p r) 
goal: padicNorm p (q + r) ≤ max (padicNorm p q) (padicNorm p r)

full_name: padicNorm.nonarchimedean
code: /-- The `p`-adic norm is nonarchimedean: the norm of `p + q` is at most the max of the norm of `p`
and the norm of `q`. -/
protected theorem nonarchimedean {q r : ℚ} :
    padicNorm p (q + r) ≤ max (padicNorm p q) (padicNorm p r) 
goal: padicNorm p (q + r) ≤ max (padicNorm p q) (padicNorm p r)

full_name: padicNorm.triangle_ineq
code: /-- The `p`-adic norm respects the triangle inequality: the norm of `p + q` is at most the norm of
`p` plus the norm of `q`. -/
theorem triangle_ineq (q r : ℚ) : padicNorm p (q + r) ≤ padicNorm p q + padicNorm p r 
goal: padicNorm p (q + r) ≤ padicNorm p q + padicNorm p r

full_name: padicNorm.sub
code: /-- The `p`-adic norm of a difference is at most the max of each component. Restates the archimedean
property of the `p`-adic norm. -/
protected theorem sub {q r : ℚ} : padicNorm p (q - r) ≤ max (padicNorm p q) (padicNorm p r) 
goal: padicNorm p (q - r) ≤ max (padicNorm p q) (padicNorm p r)

full_name: padicNorm.add_eq_max_of_ne
code: /-- If the `p`-adic norms of `q` and `r` are different, then the norm of `q + r` is equal to the max
of the norms of `q` and `r`. -/
theorem add_eq_max_of_ne {q r : ℚ} (hne : padicNorm p q ≠ padicNorm p r) :
    padicNorm p (q + r) = max (padicNorm p q) (padicNorm p r) 
goal: padicNorm p (q + r) = max (padicNorm p q) (padicNorm p r)

full_name: padicNorm.instIsAbsoluteValueRat
code: /-- The `p`-adic norm is an absolute value: positive-definite and multiplicative, satisfying the
triangle inequality. -/
instance : IsAbsoluteValue (padicNorm p) 
goal: IsAbsoluteValue (padicNorm p)

full_name: padicNorm.dvd_iff_norm_le
code: theorem dvd_iff_norm_le {n : ℕ} {z : ℤ} : ↑(p ^ n) ∣ z ↔ padicNorm p z ≤ (p : ℚ) ^ (-n : ℤ) 
goal: ↑(p ^ n) ∣ z ↔ padicNorm p ↑z ≤ ↑p ^ (-↑n)

full_name: padicNorm.int_eq_one_iff
code: /-- The `p`-adic norm of an integer `m` is one iff `p` doesn't divide `m`. -/
theorem int_eq_one_iff (m : ℤ) : padicNorm p m = 1 ↔ ¬(p : ℤ) ∣ m 
goal: padicNorm p ↑m = 1 ↔ ¬↑p ∣ m

full_name: padicNorm.int_lt_one_iff
code: theorem int_lt_one_iff (m : ℤ) : padicNorm p m < 1 ↔ (p : ℤ) ∣ m 
goal: padicNorm p ↑m < 1 ↔ ↑p ∣ m

full_name: padicNorm.of_nat
code: theorem of_nat (m : ℕ) : padicNorm p m ≤ 1 
goal: padicNorm p ↑m ≤ 1

full_name: padicNorm.nat_eq_one_iff
code: /-- The `p`-adic norm of a natural `m` is one iff `p` doesn't divide `m`. -/
theorem nat_eq_one_iff (m : ℕ) : padicNorm p m = 1 ↔ ¬p ∣ m 
goal: padicNorm p ↑m = 1 ↔ ¬p ∣ m

full_name: padicNorm.nat_lt_one_iff
code: theorem nat_lt_one_iff (m : ℕ) : padicNorm p m < 1 ↔ p ∣ m 
goal: padicNorm p ↑m < 1 ↔ p ∣ m

full_name: padicNorm.not_int_of_not_padic_int
code: /-- If a rational is not a p-adic integer, it is not an integer. -/
theorem not_int_of_not_padic_int (p : ℕ) {a : ℚ} [hp : Fact (Nat.Prime p)]
    (H : 1 < padicNorm p a) : ¬ a.isInt 
goal: ¬a.isInt = true

full_name: padicNorm.sum_lt
code: theorem sum_lt {α : Type*} {F : α → ℚ} {t : ℚ} {s : Finset α} :
    s.Nonempty → (∀ i ∈ s, padicNorm p (F i) < t) → padicNorm p (∑ i ∈ s, F i) < t 
goal: s.Nonempty → (∀ i ∈ s, padicNorm p (F i) < t) → padicNorm p (∑ i ∈ s, F i) < t

full_name: padicNorm.sum_le
code: theorem sum_le {α : Type*} {F : α → ℚ} {t : ℚ} {s : Finset α} :
    s.Nonempty → (∀ i ∈ s, padicNorm p (F i) ≤ t) → padicNorm p (∑ i ∈ s, F i) ≤ t 
goal: s.Nonempty → (∀ i ∈ s, padicNorm p (F i) ≤ t) → padicNorm p (∑ i ∈ s, F i) ≤ t

full_name: padicNorm.sum_lt'
code: theorem sum_lt' {α : Type*} {F : α → ℚ} {t : ℚ} {s : Finset α}
    (hF : ∀ i ∈ s, padicNorm p (F i) < t) (ht : 0 < t) : padicNorm p (∑ i ∈ s, F i) < t 
goal: padicNorm p (∑ i ∈ s, F i) < t

full_name: padicNorm.sum_le'
code: theorem sum_le' {α : Type*} {F : α → ℚ} {t : ℚ} {s : Finset α}
    (hF : ∀ i ∈ s, padicNorm p (F i) ≤ t) (ht : 0 ≤ t) : padicNorm p (∑ i ∈ s, F i) ≤ t 
goal: padicNorm p (∑ i ∈ s, F i) ≤ t