number_theory.padics.padic_norm
⟷
Mathlib.NumberTheory.Padics.PadicNorm
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -325,7 +325,7 @@ theorem dvd_iff_norm_le {n : ℕ} {z : ℤ} : ↑(p ^ n) ∣ z ↔ padicNorm p z
theorem int_eq_one_iff (m : ℤ) : padicNorm p m = 1 ↔ ¬(p : ℤ) ∣ m :=
by
nth_rw 2 [← pow_one p]
- simp only [dvd_iff_norm_le, Int.cast_ofNat, Nat.cast_one, zpow_neg, zpow_one, not_le]
+ simp only [dvd_iff_norm_le, Int.cast_natCast, Nat.cast_one, zpow_neg, zpow_one, not_le]
constructor
· intro h
rw [h, inv_lt_one_iff_of_pos] <;> norm_cast
@@ -360,13 +360,13 @@ theorem of_nat (m : ℕ) : padicNorm p m ≤ 1 :=
#print padicNorm.nat_eq_one_iff /-
/-- 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 := by
- simp only [← Int.natCast_dvd_natCast, ← int_eq_one_iff, Int.cast_ofNat]
+ simp only [← Int.natCast_dvd_natCast, ← int_eq_one_iff, Int.cast_natCast]
#align padic_norm.nat_eq_one_iff padicNorm.nat_eq_one_iff
-/
#print padicNorm.nat_lt_one_iff /-
theorem nat_lt_one_iff (m : ℕ) : padicNorm p m < 1 ↔ p ∣ m := by
- simp only [← Int.natCast_dvd_natCast, ← int_lt_one_iff, Int.cast_ofNat]
+ simp only [← Int.natCast_dvd_natCast, ← int_lt_one_iff, Int.cast_natCast]
#align padic_norm.nat_lt_one_iff padicNorm.nat_lt_one_iff
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -197,7 +197,7 @@ protected theorem mul (q r : ℚ) : padicNorm p (q * r) = padicNorm p q * padicN
@[simp]
protected theorem div (q r : ℚ) : padicNorm p (q / r) = padicNorm p q / padicNorm p r :=
if hr : r = 0 then by simp [hr]
- else eq_div_of_mul_eq (padicNorm.nonzero hr) (by rw [← padicNorm.mul, div_mul_cancel _ hr])
+ else eq_div_of_mul_eq (padicNorm.nonzero hr) (by rw [← padicNorm.mul, div_mul_cancel₀ _ hr])
#align padic_norm.div padicNorm.div
-/
@@ -360,13 +360,13 @@ theorem of_nat (m : ℕ) : padicNorm p m ≤ 1 :=
#print padicNorm.nat_eq_one_iff /-
/-- 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 := by
- simp only [← Int.coe_nat_dvd, ← int_eq_one_iff, Int.cast_ofNat]
+ simp only [← Int.natCast_dvd_natCast, ← int_eq_one_iff, Int.cast_ofNat]
#align padic_norm.nat_eq_one_iff padicNorm.nat_eq_one_iff
-/
#print padicNorm.nat_lt_one_iff /-
theorem nat_lt_one_iff (m : ℕ) : padicNorm p m < 1 ↔ p ∣ m := by
- simp only [← Int.coe_nat_dvd, ← int_lt_one_iff, Int.cast_ofNat]
+ simp only [← Int.natCast_dvd_natCast, ← int_lt_one_iff, Int.cast_ofNat]
#align padic_norm.nat_lt_one_iff padicNorm.nat_lt_one_iff
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -171,7 +171,7 @@ protected theorem nonzero {q : ℚ} (hq : q ≠ 0) : padicNorm p q ≠ 0 :=
theorem zero_of_padicNorm_eq_zero {q : ℚ} (h : padicNorm p q = 0) : q = 0 :=
by
apply by_contradiction; intro hq
- unfold padicNorm at h ; rw [if_neg hq] at h
+ unfold padicNorm at h; rw [if_neg hq] at h
apply absurd h
apply zpow_ne_zero_of_ne_zero
exact_mod_cast hp.1.NeZero
@@ -284,10 +284,10 @@ theorem add_eq_max_of_ne {q r : ℚ} (hne : padicNorm p q ≠ padicNorm p r) :
by
apply le_of_not_gt
intro hgt
- rw [max_eq_right_of_lt hgt] at this
+ rw [max_eq_right_of_lt hgt] at this
apply not_lt_of_ge this
assumption
- have : padicNorm p q ≤ padicNorm p (q + r) := by rwa [max_eq_left hnge] at this
+ have : padicNorm p q ≤ padicNorm p (q + r) := by rwa [max_eq_left hnge] at this
apply _root_.le_antisymm
· apply padicNorm.nonarchimedean
· rwa [max_eq_left_of_lt hlt]
@@ -307,7 +307,7 @@ instance : IsAbsoluteValue (padicNorm p)
theorem dvd_iff_norm_le {n : ℕ} {z : ℤ} : ↑(p ^ n) ∣ z ↔ padicNorm p z ≤ p ^ (-n : ℤ) :=
by
unfold padicNorm; split_ifs with hz
- · norm_cast at hz
+ · norm_cast at hz
have : 0 ≤ (p ^ n : ℚ) := by apply pow_nonneg; exact_mod_cast le_of_lt hp.1.Pos
simp [hz, this]
· rw [zpow_le_iff_le, neg_le_neg_iff, padicValRat.of_int,
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -374,13 +374,33 @@ open scoped BigOperators
#print padicNorm.sum_lt /-
theorem sum_lt {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
- s.Nonempty → (∀ i ∈ s, padicNorm p (F i) < t) → padicNorm p (∑ i in s, F i) < t := by classical
+ s.Nonempty → (∀ i ∈ s, padicNorm p (F i) < t) → padicNorm p (∑ i in s, F i) < t := by
+ classical
+ refine' s.induction_on (by rintro ⟨-, ⟨⟩⟩) _
+ rintro a S haS IH - ht
+ by_cases hs : S.nonempty
+ · rw [Finset.sum_insert haS]
+ exact
+ lt_of_le_of_lt padicNorm.nonarchimedean
+ (max_lt (ht a (Finset.mem_insert_self a S))
+ (IH hs fun b hb => ht b (Finset.mem_insert_of_mem hb)))
+ · simp_all
#align padic_norm.sum_lt padicNorm.sum_lt
-/
#print padicNorm.sum_le /-
theorem sum_le {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
- s.Nonempty → (∀ i ∈ s, padicNorm p (F i) ≤ t) → padicNorm p (∑ i in s, F i) ≤ t := by classical
+ s.Nonempty → (∀ i ∈ s, padicNorm p (F i) ≤ t) → padicNorm p (∑ i in s, F i) ≤ t := by
+ classical
+ refine' s.induction_on (by rintro ⟨-, ⟨⟩⟩) _
+ rintro a S haS IH - ht
+ by_cases hs : S.nonempty
+ · rw [Finset.sum_insert haS]
+ exact
+ padic_norm.nonarchimedean.trans
+ (max_le (ht a (Finset.mem_insert_self a S))
+ (IH hs fun b hb => ht b (Finset.mem_insert_of_mem hb)))
+ · simp_all
#align padic_norm.sum_le padicNorm.sum_le
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -374,33 +374,13 @@ open scoped BigOperators
#print padicNorm.sum_lt /-
theorem sum_lt {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
- s.Nonempty → (∀ i ∈ s, padicNorm p (F i) < t) → padicNorm p (∑ i in s, F i) < t := by
- classical
- refine' s.induction_on (by rintro ⟨-, ⟨⟩⟩) _
- rintro a S haS IH - ht
- by_cases hs : S.nonempty
- · rw [Finset.sum_insert haS]
- exact
- lt_of_le_of_lt padicNorm.nonarchimedean
- (max_lt (ht a (Finset.mem_insert_self a S))
- (IH hs fun b hb => ht b (Finset.mem_insert_of_mem hb)))
- · simp_all
+ s.Nonempty → (∀ i ∈ s, padicNorm p (F i) < t) → padicNorm p (∑ i in s, F i) < t := by classical
#align padic_norm.sum_lt padicNorm.sum_lt
-/
#print padicNorm.sum_le /-
theorem sum_le {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
- s.Nonempty → (∀ i ∈ s, padicNorm p (F i) ≤ t) → padicNorm p (∑ i in s, F i) ≤ t := by
- classical
- refine' s.induction_on (by rintro ⟨-, ⟨⟩⟩) _
- rintro a S haS IH - ht
- by_cases hs : S.nonempty
- · rw [Finset.sum_insert haS]
- exact
- padic_norm.nonarchimedean.trans
- (max_le (ht a (Finset.mem_insert_self a S))
- (IH hs fun b hb => ht b (Finset.mem_insert_of_mem hb)))
- · simp_all
+ s.Nonempty → (∀ i ∈ s, padicNorm p (F i) ≤ t) → padicNorm p (∑ i in s, F i) ≤ t := by classical
#align padic_norm.sum_le padicNorm.sum_le
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,7 +3,7 @@ Copyright (c) 2018 Robert Y. Lewis. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Robert Y. Lewis
-/
-import Mathbin.NumberTheory.Padics.PadicVal
+import NumberTheory.Padics.PadicVal
#align_import number_theory.padics.padic_norm from "leanprover-community/mathlib"@"cb3ceec8485239a61ed51d944cb9a95b68c6bafc"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,14 +2,11 @@
Copyright (c) 2018 Robert Y. Lewis. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Robert Y. Lewis
-
-! This file was ported from Lean 3 source module number_theory.padics.padic_norm
-! leanprover-community/mathlib commit cb3ceec8485239a61ed51d944cb9a95b68c6bafc
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.NumberTheory.Padics.PadicVal
+#align_import number_theory.padics.padic_norm from "leanprover-community/mathlib"@"cb3ceec8485239a61ed51d944cb9a95b68c6bafc"
+
/-!
# p-adic norm
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -60,12 +60,15 @@ open padicValRat
variable {p : ℕ}
+#print padicNorm.eq_zpow_of_nonzero /-
/-- 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) := by simp [hq, padicNorm]
#align padic_norm.eq_zpow_of_nonzero padicNorm.eq_zpow_of_nonzero
+-/
+#print padicNorm.nonneg /-
/-- The `p`-adic norm is nonnegative. -/
protected theorem nonneg (q : ℚ) : 0 ≤ padicNorm p q :=
if hq : q = 0 then by simp [hq, padicNorm]
@@ -74,6 +77,7 @@ protected theorem nonneg (q : ℚ) : 0 ≤ padicNorm p q :=
apply zpow_nonneg
exact_mod_cast Nat.zero_le _
#align padic_norm.nonneg padicNorm.nonneg
+-/
#print padicNorm.zero /-
/-- The `p`-adic norm of `0` is `0`. -/
@@ -89,13 +93,16 @@ protected theorem one : padicNorm p 1 = 1 := by simp [padicNorm]
#align padic_norm.one padicNorm.one
-/
+#print padicNorm.padicNorm_p /-
/-- The `p`-adic norm of `p` is `p⁻¹` if `p > 1`.
See also `padic_norm.padic_norm_p_of_prime` for a version assuming `p` is prime. -/
theorem padicNorm_p (hp : 1 < p) : padicNorm p p = p⁻¹ := by
simp [padicNorm, (pos_of_gt hp).ne', padicValNat.self hp]
#align padic_norm.padic_norm_p padicNorm.padicNorm_p
+-/
+#print padicNorm.padicNorm_p_of_prime /-
/-- The `p`-adic norm of `p` is `p⁻¹` if `p` is prime.
See also `padic_norm.padic_norm_p` for a version assuming `1 < p`. -/
@@ -103,7 +110,9 @@ See also `padic_norm.padic_norm_p` for a version assuming `1 < p`. -/
theorem padicNorm_p_of_prime [Fact p.Prime] : padicNorm p p = p⁻¹ :=
padicNorm_p <| Nat.Prime.one_lt (Fact.out _)
#align padic_norm.padic_norm_p_of_prime padicNorm.padicNorm_p_of_prime
+-/
+#print padicNorm.padicNorm_of_prime_of_ne /-
/-- 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 :=
@@ -111,7 +120,9 @@ theorem padicNorm_of_prime_of_ne {q : ℕ} [p_prime : Fact p.Prime] [q_prime : F
have p : padicValRat p q = 0 := by exact_mod_cast @padicValNat_primes p q p_prime q_prime neq
simp [padicNorm, p, q_prime.1.1, q_prime.1.NeZero]
#align padic_norm.padic_norm_of_prime_of_ne padicNorm.padicNorm_of_prime_of_ne
+-/
+#print padicNorm.padicNorm_p_lt_one /-
/-- The `p`-adic norm of `p` is less than `1` if `1 < p`.
See also `padic_norm.padic_norm_p_lt_one_of_prime` for a version assuming `p` is prime. -/
@@ -120,18 +131,23 @@ theorem padicNorm_p_lt_one (hp : 1 < p) : padicNorm p p < 1 :=
rw [padic_norm_p hp, inv_lt_one_iff]
exact_mod_cast Or.inr hp
#align padic_norm.padic_norm_p_lt_one padicNorm.padicNorm_p_lt_one
+-/
+#print padicNorm.padicNorm_p_lt_one_of_prime /-
/-- The `p`-adic norm of `p` is less than `1` if `p` is prime.
See also `padic_norm.padic_norm_p_lt_one` for a version assuming `1 < p`. -/
theorem padicNorm_p_lt_one_of_prime [Fact p.Prime] : padicNorm p p < 1 :=
padicNorm_p_lt_one <| Nat.Prime.one_lt (Fact.out _)
#align padic_norm.padic_norm_p_lt_one_of_prime padicNorm.padicNorm_p_lt_one_of_prime
+-/
+#print padicNorm.values_discrete /-
/-- `padic_norm p q` takes discrete values `p ^ -z` for `z : ℤ`. -/
protected theorem values_discrete {q : ℚ} (hq : q ≠ 0) : ∃ z : ℤ, padicNorm p q = p ^ (-z) :=
⟨padicValRat p q, by simp [padicNorm, hq]⟩
#align padic_norm.values_discrete padicNorm.values_discrete
+-/
#print padicNorm.neg /-
/-- `padic_norm p` is symmetric. -/
@@ -143,8 +159,6 @@ protected theorem neg (q : ℚ) : padicNorm p (-q) = padicNorm p q :=
variable [hp : Fact p.Prime]
-include hp
-
#print padicNorm.nonzero /-
/-- If `q ≠ 0`, then `padic_norm p q ≠ 0`. -/
protected theorem nonzero {q : ℚ} (hq : q ≠ 0) : padicNorm p q ≠ 0 :=
@@ -190,6 +204,7 @@ protected theorem div (q r : ℚ) : padicNorm p (q / r) = padicNorm p q / padicN
#align padic_norm.div padicNorm.div
-/
+#print padicNorm.of_int /-
/-- The `p`-adic norm of an integer is at most `1`. -/
protected theorem of_int (z : ℤ) : padicNorm p z ≤ 1 :=
if hz : z = 0 then by simp [hz, zero_le_one]
@@ -202,6 +217,7 @@ protected theorem of_int (z : ℤ) : padicNorm p z ≤ 1 :=
norm_cast; simp
exact_mod_cast hz
#align padic_norm.of_int padicNorm.of_int
+-/
private theorem nonarchimedean_aux {q r : ℚ} (h : padicValRat p q ≤ padicValRat p r) :
padicNorm p (q + r) ≤ max (padicNorm p q) (padicNorm p r) :=
@@ -223,6 +239,7 @@ private theorem nonarchimedean_aux {q r : ℚ} (h : padicValRat p q ≤ padicVal
rw [this]
apply min_le_padic_val_rat_add <;> assumption
+#print padicNorm.nonarchimedean /-
/-- 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 : ℚ} :
@@ -232,7 +249,9 @@ protected theorem nonarchimedean {q r : ℚ} :
· rw [add_comm, max_comm]; exact this (le_of_not_le hle)
exact nonarchimedean_aux hle
#align padic_norm.nonarchimedean padicNorm.nonarchimedean
+-/
+#print padicNorm.triangle_ineq /-
/-- 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 :=
@@ -241,13 +260,17 @@ theorem triangle_ineq (q r : ℚ) : padicNorm p (q + r) ≤ padicNorm p q + padi
_ ≤ padicNorm p q + padicNorm p r :=
max_le_add_of_nonneg (padicNorm.nonneg _) (padicNorm.nonneg _)
#align padic_norm.triangle_ineq padicNorm.triangle_ineq
+-/
+#print padicNorm.sub /-
/-- 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) := by
rw [sub_eq_add_neg, ← padicNorm.neg r] <;> apply padicNorm.nonarchimedean
#align padic_norm.sub padicNorm.sub
+-/
+#print padicNorm.add_eq_max_of_ne /-
/-- 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) :
@@ -272,6 +295,7 @@ theorem add_eq_max_of_ne {q r : ℚ} (hne : padicNorm p q ≠ padicNorm p r) :
· apply padicNorm.nonarchimedean
· rwa [max_eq_left_of_lt hlt]
#align padic_norm.add_eq_max_of_ne padicNorm.add_eq_max_of_ne
+-/
/-- The `p`-adic norm is an absolute value: positive-definite and multiplicative, satisfying the
triangle inequality. -/
@@ -282,6 +306,7 @@ instance : IsAbsoluteValue (padicNorm p)
abv_add := padicNorm.triangle_ineq
abv_mul := padicNorm.mul
+#print padicNorm.dvd_iff_norm_le /-
theorem dvd_iff_norm_le {n : ℕ} {z : ℤ} : ↑(p ^ n) ∣ z ↔ padicNorm p z ≤ p ^ (-n : ℤ) :=
by
unfold padicNorm; split_ifs with hz
@@ -296,7 +321,9 @@ theorem dvd_iff_norm_le {n : ℕ} {z : ℤ} : ↑(p ^ n) ∣ z ↔ padicNorm p z
· exact_mod_cast hz
· exact_mod_cast hp.1.one_lt
#align padic_norm.dvd_iff_norm_le padicNorm.dvd_iff_norm_le
+-/
+#print padicNorm.int_eq_one_iff /-
/-- 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 :=
by
@@ -317,25 +344,34 @@ theorem int_eq_one_iff (m : ℤ) : padicNorm p m = 1 ↔ ¬(p : ℤ) ∣ m :=
intro h
rw [← zpow_zero (p : ℚ), zpow_inj] <;> linarith
#align padic_norm.int_eq_one_iff padicNorm.int_eq_one_iff
+-/
+#print padicNorm.int_lt_one_iff /-
theorem int_lt_one_iff (m : ℤ) : padicNorm p m < 1 ↔ (p : ℤ) ∣ m :=
by
rw [← not_iff_not, ← int_eq_one_iff, eq_iff_le_not_lt]
simp only [padicNorm.of_int, true_and_iff]
#align padic_norm.int_lt_one_iff padicNorm.int_lt_one_iff
+-/
+#print padicNorm.of_nat /-
theorem of_nat (m : ℕ) : padicNorm p m ≤ 1 :=
padicNorm.of_int (m : ℤ)
#align padic_norm.of_nat padicNorm.of_nat
+-/
+#print padicNorm.nat_eq_one_iff /-
/-- 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 := by
simp only [← Int.coe_nat_dvd, ← int_eq_one_iff, Int.cast_ofNat]
#align padic_norm.nat_eq_one_iff padicNorm.nat_eq_one_iff
+-/
+#print padicNorm.nat_lt_one_iff /-
theorem nat_lt_one_iff (m : ℕ) : padicNorm p m < 1 ↔ p ∣ m := by
simp only [← Int.coe_nat_dvd, ← int_lt_one_iff, Int.cast_ofNat]
#align padic_norm.nat_lt_one_iff padicNorm.nat_lt_one_iff
+-/
open scoped BigOperators
@@ -355,6 +391,7 @@ theorem sum_lt {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
#align padic_norm.sum_lt padicNorm.sum_lt
-/
+#print padicNorm.sum_le /-
theorem sum_le {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
s.Nonempty → (∀ i ∈ s, padicNorm p (F i) ≤ t) → padicNorm p (∑ i in s, F i) ≤ t := by
classical
@@ -368,6 +405,7 @@ theorem sum_le {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
(IH hs fun b hb => ht b (Finset.mem_insert_of_mem hb)))
· simp_all
#align padic_norm.sum_le padicNorm.sum_le
+-/
#print padicNorm.sum_lt' /-
theorem sum_lt' {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α}
@@ -379,6 +417,7 @@ theorem sum_lt' {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α}
#align padic_norm.sum_lt' padicNorm.sum_lt'
-/
+#print padicNorm.sum_le' /-
theorem sum_le' {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α}
(hF : ∀ i ∈ s, padicNorm p (F i) ≤ t) (ht : 0 ≤ t) : padicNorm p (∑ i in s, F i) ≤ t :=
by
@@ -386,6 +425,7 @@ theorem sum_le' {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α}
· simp [ht]
· exact sum_le hs hF
#align padic_norm.sum_le' padicNorm.sum_le'
+-/
end padicNorm
mathlib commit https://github.com/leanprover-community/mathlib/commit/7e5137f579de09a059a5ce98f364a04e221aabf0
@@ -240,7 +240,6 @@ theorem triangle_ineq (q r : ℚ) : padicNorm p (q + r) ≤ padicNorm p q + padi
padicNorm p (q + r) ≤ max (padicNorm p q) (padicNorm p r) := padicNorm.nonarchimedean
_ ≤ padicNorm p q + padicNorm p r :=
max_le_add_of_nonneg (padicNorm.nonneg _) (padicNorm.nonneg _)
-
#align padic_norm.triangle_ineq padicNorm.triangle_ineq
/-- The `p`-adic norm of a difference is at most the max of each component. Restates the archimedean
@@ -261,7 +260,6 @@ theorem add_eq_max_of_ne {q r : ℚ} (hne : padicNorm p q ≠ padicNorm p r) :
padicNorm p q = padicNorm p (q + r - r) := by congr <;> ring
_ ≤ max (padicNorm p (q + r)) (padicNorm p (-r)) := padicNorm.nonarchimedean
_ = max (padicNorm p (q + r)) (padicNorm p r) := by simp
-
have hnge : padicNorm p r ≤ padicNorm p (q + r) :=
by
apply le_of_not_gt
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -287,7 +287,7 @@ instance : IsAbsoluteValue (padicNorm p)
theorem dvd_iff_norm_le {n : ℕ} {z : ℤ} : ↑(p ^ n) ∣ z ↔ padicNorm p z ≤ p ^ (-n : ℤ) :=
by
unfold padicNorm; split_ifs with hz
- · norm_cast at hz
+ · norm_cast at hz
have : 0 ≤ (p ^ n : ℚ) := by apply pow_nonneg; exact_mod_cast le_of_lt hp.1.Pos
simp [hz, this]
· rw [zpow_le_iff_le, neg_le_neg_iff, padicValRat.of_int,
@@ -345,30 +345,30 @@ open scoped BigOperators
theorem sum_lt {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
s.Nonempty → (∀ i ∈ s, padicNorm p (F i) < t) → padicNorm p (∑ i in s, F i) < t := by
classical
- refine' s.induction_on (by rintro ⟨-, ⟨⟩⟩) _
- rintro a S haS IH - ht
- by_cases hs : S.nonempty
- · rw [Finset.sum_insert haS]
- exact
- lt_of_le_of_lt padicNorm.nonarchimedean
- (max_lt (ht a (Finset.mem_insert_self a S))
- (IH hs fun b hb => ht b (Finset.mem_insert_of_mem hb)))
- · simp_all
+ refine' s.induction_on (by rintro ⟨-, ⟨⟩⟩) _
+ rintro a S haS IH - ht
+ by_cases hs : S.nonempty
+ · rw [Finset.sum_insert haS]
+ exact
+ lt_of_le_of_lt padicNorm.nonarchimedean
+ (max_lt (ht a (Finset.mem_insert_self a S))
+ (IH hs fun b hb => ht b (Finset.mem_insert_of_mem hb)))
+ · simp_all
#align padic_norm.sum_lt padicNorm.sum_lt
-/
theorem sum_le {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
s.Nonempty → (∀ i ∈ s, padicNorm p (F i) ≤ t) → padicNorm p (∑ i in s, F i) ≤ t := by
classical
- refine' s.induction_on (by rintro ⟨-, ⟨⟩⟩) _
- rintro a S haS IH - ht
- by_cases hs : S.nonempty
- · rw [Finset.sum_insert haS]
- exact
- padic_norm.nonarchimedean.trans
- (max_le (ht a (Finset.mem_insert_self a S))
- (IH hs fun b hb => ht b (Finset.mem_insert_of_mem hb)))
- · simp_all
+ refine' s.induction_on (by rintro ⟨-, ⟨⟩⟩) _
+ rintro a S haS IH - ht
+ by_cases hs : S.nonempty
+ · rw [Finset.sum_insert haS]
+ exact
+ padic_norm.nonarchimedean.trans
+ (max_le (ht a (Finset.mem_insert_self a S))
+ (IH hs fun b hb => ht b (Finset.mem_insert_of_mem hb)))
+ · simp_all
#align padic_norm.sum_le padicNorm.sum_le
#print padicNorm.sum_lt' /-
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -160,7 +160,7 @@ protected theorem nonzero {q : ℚ} (hq : q ≠ 0) : padicNorm p q ≠ 0 :=
theorem zero_of_padicNorm_eq_zero {q : ℚ} (h : padicNorm p q = 0) : q = 0 :=
by
apply by_contradiction; intro hq
- unfold padicNorm at h; rw [if_neg hq] at h
+ unfold padicNorm at h ; rw [if_neg hq] at h
apply absurd h
apply zpow_ne_zero_of_ne_zero
exact_mod_cast hp.1.NeZero
@@ -266,10 +266,10 @@ theorem add_eq_max_of_ne {q r : ℚ} (hne : padicNorm p q ≠ padicNorm p r) :
by
apply le_of_not_gt
intro hgt
- rw [max_eq_right_of_lt hgt] at this
+ rw [max_eq_right_of_lt hgt] at this
apply not_lt_of_ge this
assumption
- have : padicNorm p q ≤ padicNorm p (q + r) := by rwa [max_eq_left hnge] at this
+ have : padicNorm p q ≤ padicNorm p (q + r) := by rwa [max_eq_left hnge] at this
apply _root_.le_antisymm
· apply padicNorm.nonarchimedean
· rwa [max_eq_left_of_lt hlt]
@@ -280,14 +280,14 @@ triangle inequality. -/
instance : IsAbsoluteValue (padicNorm p)
where
abv_nonneg := padicNorm.nonneg
- abv_eq_zero _ := ⟨zero_of_padicNorm_eq_zero, fun hx => by simpa only [hx] ⟩
+ abv_eq_zero _ := ⟨zero_of_padicNorm_eq_zero, fun hx => by simpa only [hx]⟩
abv_add := padicNorm.triangle_ineq
abv_mul := padicNorm.mul
theorem dvd_iff_norm_le {n : ℕ} {z : ℤ} : ↑(p ^ n) ∣ z ↔ padicNorm p z ≤ p ^ (-n : ℤ) :=
by
unfold padicNorm; split_ifs with hz
- · norm_cast at hz
+ · norm_cast at hz
have : 0 ≤ (p ^ n : ℚ) := by apply pow_nonneg; exact_mod_cast le_of_lt hp.1.Pos
simp [hz, this]
· rw [zpow_le_iff_le, neg_le_neg_iff, padicValRat.of_int,
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -339,8 +339,9 @@ theorem nat_lt_one_iff (m : ℕ) : padicNorm p m < 1 ↔ p ∣ m := by
simp only [← Int.coe_nat_dvd, ← int_lt_one_iff, Int.cast_ofNat]
#align padic_norm.nat_lt_one_iff padicNorm.nat_lt_one_iff
-open BigOperators
+open scoped BigOperators
+#print padicNorm.sum_lt /-
theorem sum_lt {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
s.Nonempty → (∀ i ∈ s, padicNorm p (F i) < t) → padicNorm p (∑ i in s, F i) < t := by
classical
@@ -354,6 +355,7 @@ theorem sum_lt {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
(IH hs fun b hb => ht b (Finset.mem_insert_of_mem hb)))
· simp_all
#align padic_norm.sum_lt padicNorm.sum_lt
+-/
theorem sum_le {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
s.Nonempty → (∀ i ∈ s, padicNorm p (F i) ≤ t) → padicNorm p (∑ i in s, F i) ≤ t := by
@@ -369,6 +371,7 @@ theorem sum_le {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
· simp_all
#align padic_norm.sum_le padicNorm.sum_le
+#print padicNorm.sum_lt' /-
theorem sum_lt' {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α}
(hF : ∀ i ∈ s, padicNorm p (F i) < t) (ht : 0 < t) : padicNorm p (∑ i in s, F i) < t :=
by
@@ -376,6 +379,7 @@ theorem sum_lt' {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α}
· simp [ht]
· exact sum_lt hs hF
#align padic_norm.sum_lt' padicNorm.sum_lt'
+-/
theorem sum_le' {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α}
(hF : ∀ i ∈ s, padicNorm p (F i) ≤ t) (ht : 0 ≤ t) : padicNorm p (∑ i in s, F i) ≤ t :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -60,24 +60,12 @@ open padicValRat
variable {p : ℕ}
-/- warning: padic_norm.eq_zpow_of_nonzero -> padicNorm.eq_zpow_of_nonzero is a dubious translation:
-lean 3 declaration is
- forall {p : Nat} {q : Rat}, (Ne.{1} Rat q (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero)))) -> (Eq.{1} Rat (padicNorm p q) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p) (Neg.neg.{0} Int Int.hasNeg (padicValRat p q))))
-but is expected to have type
- forall {p : Nat} {q : Rat}, (Ne.{1} Rat q (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0))) -> (Eq.{1} Rat (padicNorm p q) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) p) (Neg.neg.{0} Int Int.instNegInt (padicValRat p q))))
-Case conversion may be inaccurate. Consider using '#align padic_norm.eq_zpow_of_nonzero padicNorm.eq_zpow_of_nonzeroₓ'. -/
/-- 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) := by simp [hq, padicNorm]
#align padic_norm.eq_zpow_of_nonzero padicNorm.eq_zpow_of_nonzero
-/- warning: padic_norm.nonneg -> padicNorm.nonneg is a dubious translation:
-lean 3 declaration is
- forall {p : Nat} (q : Rat), LE.le.{0} Rat Rat.hasLe (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))) (padicNorm p q)
-but is expected to have type
- forall {p : Nat} (q : Rat), LE.le.{0} Rat Rat.instLERat (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)) (padicNorm p q)
-Case conversion may be inaccurate. Consider using '#align padic_norm.nonneg padicNorm.nonnegₓ'. -/
/-- The `p`-adic norm is nonnegative. -/
protected theorem nonneg (q : ℚ) : 0 ≤ padicNorm p q :=
if hq : q = 0 then by simp [hq, padicNorm]
@@ -101,12 +89,6 @@ protected theorem one : padicNorm p 1 = 1 := by simp [padicNorm]
#align padic_norm.one padicNorm.one
-/
-/- warning: padic_norm.padic_norm_p -> padicNorm.padicNorm_p is a dubious translation:
-lean 3 declaration is
- forall {p : Nat}, (LT.lt.{0} Nat Nat.hasLt (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))) p) -> (Eq.{1} Rat (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)) (Inv.inv.{0} Rat Rat.hasInv ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)))
-but is expected to have type
- forall {p : Nat}, (LT.lt.{0} Nat instLTNat (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)) p) -> (Eq.{1} Rat (padicNorm p (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) p)) (Inv.inv.{0} Rat Rat.instInvRat (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) p)))
-Case conversion may be inaccurate. Consider using '#align padic_norm.padic_norm_p padicNorm.padicNorm_pₓ'. -/
/-- The `p`-adic norm of `p` is `p⁻¹` if `p > 1`.
See also `padic_norm.padic_norm_p_of_prime` for a version assuming `p` is prime. -/
@@ -114,12 +96,6 @@ theorem padicNorm_p (hp : 1 < p) : padicNorm p p = p⁻¹ := by
simp [padicNorm, (pos_of_gt hp).ne', padicValNat.self hp]
#align padic_norm.padic_norm_p padicNorm.padicNorm_p
-/- warning: padic_norm.padic_norm_p_of_prime -> padicNorm.padicNorm_p_of_prime is a dubious translation:
-lean 3 declaration is
- forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)], Eq.{1} Rat (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)) (Inv.inv.{0} Rat Rat.hasInv ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p))
-but is expected to have type
- forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)], Eq.{1} Rat (padicNorm p (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) p)) (Inv.inv.{0} Rat Rat.instInvRat (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) p))
-Case conversion may be inaccurate. Consider using '#align padic_norm.padic_norm_p_of_prime padicNorm.padicNorm_p_of_primeₓ'. -/
/-- The `p`-adic norm of `p` is `p⁻¹` if `p` is prime.
See also `padic_norm.padic_norm_p` for a version assuming `1 < p`. -/
@@ -128,12 +104,6 @@ theorem padicNorm_p_of_prime [Fact p.Prime] : padicNorm p p = p⁻¹ :=
padicNorm_p <| Nat.Prime.one_lt (Fact.out _)
#align padic_norm.padic_norm_p_of_prime padicNorm.padicNorm_p_of_prime
-/- warning: padic_norm.padic_norm_of_prime_of_ne -> padicNorm.padicNorm_of_prime_of_ne is a dubious translation:
-lean 3 declaration is
- forall {p : Nat} {q : Nat} [p_prime : Fact (Nat.Prime p)] [q_prime : Fact (Nat.Prime q)], (Ne.{1} Nat p q) -> (Eq.{1} Rat (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) q)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne))))
-but is expected to have type
- forall {p : Nat} {q : Nat} [p_prime : Fact (Nat.Prime p)] [q_prime : Fact (Nat.Prime q)], (Ne.{1} Nat p q) -> (Eq.{1} Rat (padicNorm p (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) q)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))
-Case conversion may be inaccurate. Consider using '#align padic_norm.padic_norm_of_prime_of_ne padicNorm.padicNorm_of_prime_of_neₓ'. -/
/-- 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 :=
@@ -142,12 +112,6 @@ theorem padicNorm_of_prime_of_ne {q : ℕ} [p_prime : Fact p.Prime] [q_prime : F
simp [padicNorm, p, q_prime.1.1, q_prime.1.NeZero]
#align padic_norm.padic_norm_of_prime_of_ne padicNorm.padicNorm_of_prime_of_ne
-/- warning: padic_norm.padic_norm_p_lt_one -> padicNorm.padicNorm_p_lt_one is a dubious translation:
-lean 3 declaration is
- forall {p : Nat}, (LT.lt.{0} Nat Nat.hasLt (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))) p) -> (LT.lt.{0} Rat Rat.hasLt (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne))))
-but is expected to have type
- forall {p : Nat}, (LT.lt.{0} Nat instLTNat (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)) p) -> (LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) p)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))
-Case conversion may be inaccurate. Consider using '#align padic_norm.padic_norm_p_lt_one padicNorm.padicNorm_p_lt_oneₓ'. -/
/-- The `p`-adic norm of `p` is less than `1` if `1 < p`.
See also `padic_norm.padic_norm_p_lt_one_of_prime` for a version assuming `p` is prime. -/
@@ -157,12 +121,6 @@ theorem padicNorm_p_lt_one (hp : 1 < p) : padicNorm p p < 1 :=
exact_mod_cast Or.inr hp
#align padic_norm.padic_norm_p_lt_one padicNorm.padicNorm_p_lt_one
-/- warning: padic_norm.padic_norm_p_lt_one_of_prime -> padicNorm.padicNorm_p_lt_one_of_prime is a dubious translation:
-lean 3 declaration is
- forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)], LT.lt.{0} Rat Rat.hasLt (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))
-but is expected to have type
- forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)], LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) p)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))
-Case conversion may be inaccurate. Consider using '#align padic_norm.padic_norm_p_lt_one_of_prime padicNorm.padicNorm_p_lt_one_of_primeₓ'. -/
/-- The `p`-adic norm of `p` is less than `1` if `p` is prime.
See also `padic_norm.padic_norm_p_lt_one` for a version assuming `1 < p`. -/
@@ -170,12 +128,6 @@ theorem padicNorm_p_lt_one_of_prime [Fact p.Prime] : padicNorm p p < 1 :=
padicNorm_p_lt_one <| Nat.Prime.one_lt (Fact.out _)
#align padic_norm.padic_norm_p_lt_one_of_prime padicNorm.padicNorm_p_lt_one_of_prime
-/- warning: padic_norm.values_discrete -> padicNorm.values_discrete is a dubious translation:
-lean 3 declaration is
- forall {p : Nat} {q : Rat}, (Ne.{1} Rat q (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero)))) -> (Exists.{1} Int (fun (z : Int) => Eq.{1} Rat (padicNorm p q) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p) (Neg.neg.{0} Int Int.hasNeg z))))
-but is expected to have type
- forall {p : Nat} {q : Rat}, (Ne.{1} Rat q (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0))) -> (Exists.{1} Int (fun (z : Int) => Eq.{1} Rat (padicNorm p q) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) p) (Neg.neg.{0} Int Int.instNegInt z))))
-Case conversion may be inaccurate. Consider using '#align padic_norm.values_discrete padicNorm.values_discreteₓ'. -/
/-- `padic_norm p q` takes discrete values `p ^ -z` for `z : ℤ`. -/
protected theorem values_discrete {q : ℚ} (hq : q ≠ 0) : ∃ z : ℤ, padicNorm p q = p ^ (-z) :=
⟨padicValRat p q, by simp [padicNorm, hq]⟩
@@ -238,12 +190,6 @@ protected theorem div (q r : ℚ) : padicNorm p (q / r) = padicNorm p q / padicN
#align padic_norm.div padicNorm.div
-/
-/- warning: padic_norm.of_int -> padicNorm.of_int is a dubious translation:
-lean 3 declaration is
- forall {p : Nat} [hp : Fact (Nat.Prime p)] (z : Int), LE.le.{0} Rat Rat.hasLe (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) z)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))
-but is expected to have type
- forall {p : Nat} [hp : Fact (Nat.Prime p)] (z : Int), LE.le.{0} Rat Rat.instLERat (padicNorm p (Int.cast.{0} Rat Rat.instIntCastRat z)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))
-Case conversion may be inaccurate. Consider using '#align padic_norm.of_int padicNorm.of_intₓ'. -/
/-- The `p`-adic norm of an integer is at most `1`. -/
protected theorem of_int (z : ℤ) : padicNorm p z ≤ 1 :=
if hz : z = 0 then by simp [hz, zero_le_one]
@@ -277,12 +223,6 @@ private theorem nonarchimedean_aux {q r : ℚ} (h : padicValRat p q ≤ padicVal
rw [this]
apply min_le_padic_val_rat_add <;> assumption
-/- warning: padic_norm.nonarchimedean -> padicNorm.nonarchimedean is a dubious translation:
-lean 3 declaration is
- forall {p : Nat} [hp : Fact (Nat.Prime p)] {q : Rat} {r : Rat}, LE.le.{0} Rat Rat.hasLe (padicNorm p (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.hasAdd) q r)) (LinearOrder.max.{0} Rat Rat.linearOrder (padicNorm p q) (padicNorm p r))
-but is expected to have type
- forall {p : Nat} [hp : Fact (Nat.Prime p)] {q : Rat} {r : Rat}, LE.le.{0} Rat Rat.instLERat (padicNorm p (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.instAddRat) q r)) (Max.max.{0} Rat (LinearOrderedRing.toMax.{0} Rat Rat.instLinearOrderedRingRat) (padicNorm p q) (padicNorm p r))
-Case conversion may be inaccurate. Consider using '#align padic_norm.nonarchimedean padicNorm.nonarchimedeanₓ'. -/
/-- 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 : ℚ} :
@@ -293,12 +233,6 @@ protected theorem nonarchimedean {q r : ℚ} :
exact nonarchimedean_aux hle
#align padic_norm.nonarchimedean padicNorm.nonarchimedean
-/- warning: padic_norm.triangle_ineq -> padicNorm.triangle_ineq is a dubious translation:
-lean 3 declaration is
- forall {p : Nat} [hp : Fact (Nat.Prime p)] (q : Rat) (r : Rat), LE.le.{0} Rat Rat.hasLe (padicNorm p (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.hasAdd) q r)) (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.hasAdd) (padicNorm p q) (padicNorm p r))
-but is expected to have type
- forall {p : Nat} [hp : Fact (Nat.Prime p)] (q : Rat) (r : Rat), LE.le.{0} Rat Rat.instLERat (padicNorm p (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.instAddRat) q r)) (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.instAddRat) (padicNorm p q) (padicNorm p r))
-Case conversion may be inaccurate. Consider using '#align padic_norm.triangle_ineq padicNorm.triangle_ineqₓ'. -/
/-- 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 :=
@@ -309,24 +243,12 @@ theorem triangle_ineq (q r : ℚ) : padicNorm p (q + r) ≤ padicNorm p q + padi
#align padic_norm.triangle_ineq padicNorm.triangle_ineq
-/- warning: padic_norm.sub -> padicNorm.sub is a dubious translation:
-lean 3 declaration is
- forall {p : Nat} [hp : Fact (Nat.Prime p)] {q : Rat} {r : Rat}, LE.le.{0} Rat Rat.hasLe (padicNorm p (HSub.hSub.{0, 0, 0} Rat Rat Rat (instHSub.{0} Rat (SubNegMonoid.toHasSub.{0} Rat (AddGroup.toSubNegMonoid.{0} Rat Rat.addGroup))) q r)) (LinearOrder.max.{0} Rat Rat.linearOrder (padicNorm p q) (padicNorm p r))
-but is expected to have type
- forall {p : Nat} [hp : Fact (Nat.Prime p)] {q : Rat} {r : Rat}, LE.le.{0} Rat Rat.instLERat (padicNorm p (HSub.hSub.{0, 0, 0} Rat Rat Rat (instHSub.{0} Rat Rat.instSubRat) q r)) (Max.max.{0} Rat (LinearOrderedRing.toMax.{0} Rat Rat.instLinearOrderedRingRat) (padicNorm p q) (padicNorm p r))
-Case conversion may be inaccurate. Consider using '#align padic_norm.sub padicNorm.subₓ'. -/
/-- 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) := by
rw [sub_eq_add_neg, ← padicNorm.neg r] <;> apply padicNorm.nonarchimedean
#align padic_norm.sub padicNorm.sub
-/- warning: padic_norm.add_eq_max_of_ne -> padicNorm.add_eq_max_of_ne is a dubious translation:
-lean 3 declaration is
- forall {p : Nat} [hp : Fact (Nat.Prime p)] {q : Rat} {r : Rat}, (Ne.{1} Rat (padicNorm p q) (padicNorm p r)) -> (Eq.{1} Rat (padicNorm p (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.hasAdd) q r)) (LinearOrder.max.{0} Rat Rat.linearOrder (padicNorm p q) (padicNorm p r)))
-but is expected to have type
- forall {p : Nat} [hp : Fact (Nat.Prime p)] {q : Rat} {r : Rat}, (Ne.{1} Rat (padicNorm p q) (padicNorm p r)) -> (Eq.{1} Rat (padicNorm p (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.instAddRat) q r)) (Max.max.{0} Rat (LinearOrderedRing.toMax.{0} Rat Rat.instLinearOrderedRingRat) (padicNorm p q) (padicNorm p r)))
-Case conversion may be inaccurate. Consider using '#align padic_norm.add_eq_max_of_ne padicNorm.add_eq_max_of_neₓ'. -/
/-- 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) :
@@ -362,12 +284,6 @@ instance : IsAbsoluteValue (padicNorm p)
abv_add := padicNorm.triangle_ineq
abv_mul := padicNorm.mul
-/- warning: padic_norm.dvd_iff_norm_le -> padicNorm.dvd_iff_norm_le is a dubious translation:
-lean 3 declaration is
- forall {p : Nat} [hp : Fact (Nat.Prime p)] {n : Nat} {z : Int}, Iff (Dvd.Dvd.{0} Int (semigroupDvd.{0} Int Int.semigroup) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat (Monoid.Pow.{0} Nat Nat.monoid)) p n)) z) (LE.le.{0} Rat Rat.hasLe (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) z)) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p) (Neg.neg.{0} Int Int.hasNeg ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) n))))
-but is expected to have type
- forall {p : Nat} [hp : Fact (Nat.Prime p)] {n : Nat} {z : Int}, Iff (Dvd.dvd.{0} Int Int.instDvdInt (Nat.cast.{0} Int instNatCastInt (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat instPowNat) p n)) z) (LE.le.{0} Rat Rat.instLERat (padicNorm p (Int.cast.{0} Rat Rat.instIntCastRat z)) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) p) (Neg.neg.{0} Int Int.instNegInt (Nat.cast.{0} Int instNatCastInt n))))
-Case conversion may be inaccurate. Consider using '#align padic_norm.dvd_iff_norm_le padicNorm.dvd_iff_norm_leₓ'. -/
theorem dvd_iff_norm_le {n : ℕ} {z : ℤ} : ↑(p ^ n) ∣ z ↔ padicNorm p z ≤ p ^ (-n : ℤ) :=
by
unfold padicNorm; split_ifs with hz
@@ -383,12 +299,6 @@ theorem dvd_iff_norm_le {n : ℕ} {z : ℤ} : ↑(p ^ n) ∣ z ↔ padicNorm p z
· exact_mod_cast hp.1.one_lt
#align padic_norm.dvd_iff_norm_le padicNorm.dvd_iff_norm_le
-/- warning: padic_norm.int_eq_one_iff -> padicNorm.int_eq_one_iff is a dubious translation:
-lean 3 declaration is
- forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Int), Iff (Eq.{1} Rat (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) m)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))) (Not (Dvd.Dvd.{0} Int (semigroupDvd.{0} Int Int.semigroup) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) p) m))
-but is expected to have type
- forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Int), Iff (Eq.{1} Rat (padicNorm p (Int.cast.{0} Rat Rat.instIntCastRat m)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))) (Not (Dvd.dvd.{0} Int Int.instDvdInt (Nat.cast.{0} Int instNatCastInt p) m))
-Case conversion may be inaccurate. Consider using '#align padic_norm.int_eq_one_iff padicNorm.int_eq_one_iffₓ'. -/
/-- 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 :=
by
@@ -410,57 +320,27 @@ theorem int_eq_one_iff (m : ℤ) : padicNorm p m = 1 ↔ ¬(p : ℤ) ∣ m :=
rw [← zpow_zero (p : ℚ), zpow_inj] <;> linarith
#align padic_norm.int_eq_one_iff padicNorm.int_eq_one_iff
-/- warning: padic_norm.int_lt_one_iff -> padicNorm.int_lt_one_iff is a dubious translation:
-lean 3 declaration is
- forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Int), Iff (LT.lt.{0} Rat Rat.hasLt (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) m)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))) (Dvd.Dvd.{0} Int (semigroupDvd.{0} Int Int.semigroup) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) p) m)
-but is expected to have type
- forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Int), Iff (LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (Int.cast.{0} Rat Rat.instIntCastRat m)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))) (Dvd.dvd.{0} Int Int.instDvdInt (Nat.cast.{0} Int instNatCastInt p) m)
-Case conversion may be inaccurate. Consider using '#align padic_norm.int_lt_one_iff padicNorm.int_lt_one_iffₓ'. -/
theorem int_lt_one_iff (m : ℤ) : padicNorm p m < 1 ↔ (p : ℤ) ∣ m :=
by
rw [← not_iff_not, ← int_eq_one_iff, eq_iff_le_not_lt]
simp only [padicNorm.of_int, true_and_iff]
#align padic_norm.int_lt_one_iff padicNorm.int_lt_one_iff
-/- warning: padic_norm.of_nat -> padicNorm.of_nat is a dubious translation:
-lean 3 declaration is
- forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), LE.le.{0} Rat Rat.hasLe (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) m)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))
-but is expected to have type
- forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), LE.le.{0} Rat Rat.instLERat (padicNorm p (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) m)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))
-Case conversion may be inaccurate. Consider using '#align padic_norm.of_nat padicNorm.of_natₓ'. -/
theorem of_nat (m : ℕ) : padicNorm p m ≤ 1 :=
padicNorm.of_int (m : ℤ)
#align padic_norm.of_nat padicNorm.of_nat
-/- warning: padic_norm.nat_eq_one_iff -> padicNorm.nat_eq_one_iff is a dubious translation:
-lean 3 declaration is
- forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), Iff (Eq.{1} Rat (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) m)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))) (Not (Dvd.Dvd.{0} Nat Nat.hasDvd p m))
-but is expected to have type
- forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), Iff (Eq.{1} Rat (padicNorm p (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) m)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))) (Not (Dvd.dvd.{0} Nat Nat.instDvdNat p m))
-Case conversion may be inaccurate. Consider using '#align padic_norm.nat_eq_one_iff padicNorm.nat_eq_one_iffₓ'. -/
/-- 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 := by
simp only [← Int.coe_nat_dvd, ← int_eq_one_iff, Int.cast_ofNat]
#align padic_norm.nat_eq_one_iff padicNorm.nat_eq_one_iff
-/- warning: padic_norm.nat_lt_one_iff -> padicNorm.nat_lt_one_iff is a dubious translation:
-lean 3 declaration is
- forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), Iff (LT.lt.{0} Rat Rat.hasLt (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) m)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))) (Dvd.Dvd.{0} Nat Nat.hasDvd p m)
-but is expected to have type
- forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), Iff (LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) m)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))) (Dvd.dvd.{0} Nat Nat.instDvdNat p m)
-Case conversion may be inaccurate. Consider using '#align padic_norm.nat_lt_one_iff padicNorm.nat_lt_one_iffₓ'. -/
theorem nat_lt_one_iff (m : ℕ) : padicNorm p m < 1 ↔ p ∣ m := by
simp only [← Int.coe_nat_dvd, ← int_lt_one_iff, Int.cast_ofNat]
#align padic_norm.nat_lt_one_iff padicNorm.nat_lt_one_iff
open BigOperators
-/- warning: padic_norm.sum_lt -> padicNorm.sum_lt is a dubious translation:
-lean 3 declaration is
- forall {p : Nat} [hp : Fact (Nat.Prime p)] {α : Type.{u1}} {F : α -> Rat} {t : Rat} {s : Finset.{u1} α}, (Finset.Nonempty.{u1} α s) -> (forall (i : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) i s) -> (LT.lt.{0} Rat Rat.hasLt (padicNorm p (F i)) t)) -> (LT.lt.{0} Rat Rat.hasLt (padicNorm p (Finset.sum.{0, u1} Rat α Rat.addCommMonoid s (fun (i : α) => F i))) t)
-but is expected to have type
- forall {p : Nat} [hp : Fact (Nat.Prime p)] {α : Type.{u1}} {F : α -> Rat} {t : Rat} {s : Finset.{u1} α}, (Finset.Nonempty.{u1} α s) -> (forall (i : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) i s) -> (LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (F i)) t)) -> (LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (Finset.sum.{0, u1} Rat α Rat.addCommMonoid s (fun (i : α) => F i))) t)
-Case conversion may be inaccurate. Consider using '#align padic_norm.sum_lt padicNorm.sum_ltₓ'. -/
theorem sum_lt {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
s.Nonempty → (∀ i ∈ s, padicNorm p (F i) < t) → padicNorm p (∑ i in s, F i) < t := by
classical
@@ -475,12 +355,6 @@ theorem sum_lt {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
· simp_all
#align padic_norm.sum_lt padicNorm.sum_lt
-/- warning: padic_norm.sum_le -> padicNorm.sum_le is a dubious translation:
-lean 3 declaration is
- forall {p : Nat} [hp : Fact (Nat.Prime p)] {α : Type.{u1}} {F : α -> Rat} {t : Rat} {s : Finset.{u1} α}, (Finset.Nonempty.{u1} α s) -> (forall (i : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) i s) -> (LE.le.{0} Rat Rat.hasLe (padicNorm p (F i)) t)) -> (LE.le.{0} Rat Rat.hasLe (padicNorm p (Finset.sum.{0, u1} Rat α Rat.addCommMonoid s (fun (i : α) => F i))) t)
-but is expected to have type
- forall {p : Nat} [hp : Fact (Nat.Prime p)] {α : Type.{u1}} {F : α -> Rat} {t : Rat} {s : Finset.{u1} α}, (Finset.Nonempty.{u1} α s) -> (forall (i : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) i s) -> (LE.le.{0} Rat Rat.instLERat (padicNorm p (F i)) t)) -> (LE.le.{0} Rat Rat.instLERat (padicNorm p (Finset.sum.{0, u1} Rat α Rat.addCommMonoid s (fun (i : α) => F i))) t)
-Case conversion may be inaccurate. Consider using '#align padic_norm.sum_le padicNorm.sum_leₓ'. -/
theorem sum_le {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
s.Nonempty → (∀ i ∈ s, padicNorm p (F i) ≤ t) → padicNorm p (∑ i in s, F i) ≤ t := by
classical
@@ -495,12 +369,6 @@ theorem sum_le {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
· simp_all
#align padic_norm.sum_le padicNorm.sum_le
-/- warning: padic_norm.sum_lt' -> padicNorm.sum_lt' is a dubious translation:
-lean 3 declaration is
- forall {p : Nat} [hp : Fact (Nat.Prime p)] {α : Type.{u1}} {F : α -> Rat} {t : Rat} {s : Finset.{u1} α}, (forall (i : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) i s) -> (LT.lt.{0} Rat Rat.hasLt (padicNorm p (F i)) t)) -> (LT.lt.{0} Rat Rat.hasLt (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))) t) -> (LT.lt.{0} Rat Rat.hasLt (padicNorm p (Finset.sum.{0, u1} Rat α Rat.addCommMonoid s (fun (i : α) => F i))) t)
-but is expected to have type
- forall {p : Nat} [hp : Fact (Nat.Prime p)] {α : Type.{u1}} {F : α -> Rat} {t : Rat} {s : Finset.{u1} α}, (forall (i : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) i s) -> (LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (F i)) t)) -> (LT.lt.{0} Rat Rat.instLTRat_1 (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)) t) -> (LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (Finset.sum.{0, u1} Rat α Rat.addCommMonoid s (fun (i : α) => F i))) t)
-Case conversion may be inaccurate. Consider using '#align padic_norm.sum_lt' padicNorm.sum_lt'ₓ'. -/
theorem sum_lt' {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α}
(hF : ∀ i ∈ s, padicNorm p (F i) < t) (ht : 0 < t) : padicNorm p (∑ i in s, F i) < t :=
by
@@ -509,12 +377,6 @@ theorem sum_lt' {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α}
· exact sum_lt hs hF
#align padic_norm.sum_lt' padicNorm.sum_lt'
-/- warning: padic_norm.sum_le' -> padicNorm.sum_le' is a dubious translation:
-lean 3 declaration is
- forall {p : Nat} [hp : Fact (Nat.Prime p)] {α : Type.{u1}} {F : α -> Rat} {t : Rat} {s : Finset.{u1} α}, (forall (i : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) i s) -> (LE.le.{0} Rat Rat.hasLe (padicNorm p (F i)) t)) -> (LE.le.{0} Rat Rat.hasLe (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))) t) -> (LE.le.{0} Rat Rat.hasLe (padicNorm p (Finset.sum.{0, u1} Rat α Rat.addCommMonoid s (fun (i : α) => F i))) t)
-but is expected to have type
- forall {p : Nat} [hp : Fact (Nat.Prime p)] {α : Type.{u1}} {F : α -> Rat} {t : Rat} {s : Finset.{u1} α}, (forall (i : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) i s) -> (LE.le.{0} Rat Rat.instLERat (padicNorm p (F i)) t)) -> (LE.le.{0} Rat Rat.instLERat (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)) t) -> (LE.le.{0} Rat Rat.instLERat (padicNorm p (Finset.sum.{0, u1} Rat α Rat.addCommMonoid s (fun (i : α) => F i))) t)
-Case conversion may be inaccurate. Consider using '#align padic_norm.sum_le' padicNorm.sum_le'ₓ'. -/
theorem sum_le' {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α}
(hF : ∀ i ∈ s, padicNorm p (F i) ≤ t) (ht : 0 ≤ t) : padicNorm p (∑ i in s, F i) ≤ t :=
by
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -253,8 +253,7 @@ protected theorem of_int (z : ℤ) : padicNorm p z ≤ 1 :=
· refine' zpow_le_one_of_nonpos _ _
· exact_mod_cast le_of_lt hp.1.one_lt
· rw [padicValRat.of_int, neg_nonpos]
- norm_cast
- simp
+ norm_cast; simp
exact_mod_cast hz
#align padic_norm.of_int padicNorm.of_int
@@ -290,8 +289,7 @@ protected theorem nonarchimedean {q r : ℚ} :
padicNorm p (q + r) ≤ max (padicNorm p q) (padicNorm p r) :=
by
wlog hle : padicValRat p q ≤ padicValRat p r generalizing q r
- · rw [add_comm, max_comm]
- exact this (le_of_not_le hle)
+ · rw [add_comm, max_comm]; exact this (le_of_not_le hle)
exact nonarchimedean_aux hle
#align padic_norm.nonarchimedean padicNorm.nonarchimedean
@@ -335,8 +333,7 @@ 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) :=
by
wlog hlt : padicNorm p r < padicNorm p q
- · rw [add_comm, max_comm]
- exact this hne.symm (hne.lt_or_lt.resolve_right hlt)
+ · rw [add_comm, max_comm]; exact this hne.symm (hne.lt_or_lt.resolve_right hlt)
have : padicNorm p q ≤ max (padicNorm p (q + r)) (padicNorm p r) :=
calc
padicNorm p q = padicNorm p (q + r - r) := by congr <;> ring
@@ -375,9 +372,7 @@ theorem dvd_iff_norm_le {n : ℕ} {z : ℤ} : ↑(p ^ n) ∣ z ↔ padicNorm p z
by
unfold padicNorm; split_ifs with hz
· norm_cast at hz
- have : 0 ≤ (p ^ n : ℚ) := by
- apply pow_nonneg
- exact_mod_cast le_of_lt hp.1.Pos
+ have : 0 ≤ (p ^ n : ℚ) := by apply pow_nonneg; exact_mod_cast le_of_lt hp.1.Pos
simp [hz, this]
· rw [zpow_le_iff_le, neg_le_neg_iff, padicValRat.of_int,
padicValInt.of_ne_one_ne_zero hp.1.ne_one _]
@@ -407,12 +402,10 @@ theorem int_eq_one_iff (m : ℤ) : padicNorm p m = 1 ↔ ¬(p : ℤ) ∣ m :=
· simp only [padicNorm]
split_ifs
· rw [inv_lt_zero, ← Nat.cast_zero, Nat.cast_lt]
- intro h
- exact (Nat.not_lt_zero p h).elim
+ intro h; exact (Nat.not_lt_zero p h).elim
· have : 1 < (p : ℚ) := by norm_cast <;> exact Nat.Prime.one_lt (Fact.out _ : Nat.Prime p)
rw [← zpow_neg_one, zpow_lt_iff_lt this]
- have : 0 ≤ padicValRat p m
- simp only [of_int, Nat.cast_nonneg]
+ have : 0 ≤ padicValRat p m; simp only [of_int, Nat.cast_nonneg]
intro h
rw [← zpow_zero (p : ℚ), zpow_inj] <;> linarith
#align padic_norm.int_eq_one_iff padicNorm.int_eq_one_iff
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -277,7 +277,6 @@ private theorem nonarchimedean_aux {q r : ℚ} (h : padicValRat p q ≤ padicVal
have : padicValRat p q = min (padicValRat p q) (padicValRat p r) := (min_eq_left h).symm
rw [this]
apply min_le_padic_val_rat_add <;> assumption
-#align padic_norm.nonarchimedean_aux padic_norm.nonarchimedean_aux
/- warning: padic_norm.nonarchimedean -> padicNorm.nonarchimedean is a dubious translation:
lean 3 declaration is
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -463,7 +463,12 @@ theorem nat_lt_one_iff (m : ℕ) : padicNorm p m < 1 ↔ p ∣ m := by
open BigOperators
-#print padicNorm.sum_lt /-
+/- warning: padic_norm.sum_lt -> padicNorm.sum_lt is a dubious translation:
+lean 3 declaration is
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] {α : Type.{u1}} {F : α -> Rat} {t : Rat} {s : Finset.{u1} α}, (Finset.Nonempty.{u1} α s) -> (forall (i : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) i s) -> (LT.lt.{0} Rat Rat.hasLt (padicNorm p (F i)) t)) -> (LT.lt.{0} Rat Rat.hasLt (padicNorm p (Finset.sum.{0, u1} Rat α Rat.addCommMonoid s (fun (i : α) => F i))) t)
+but is expected to have type
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] {α : Type.{u1}} {F : α -> Rat} {t : Rat} {s : Finset.{u1} α}, (Finset.Nonempty.{u1} α s) -> (forall (i : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) i s) -> (LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (F i)) t)) -> (LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (Finset.sum.{0, u1} Rat α Rat.addCommMonoid s (fun (i : α) => F i))) t)
+Case conversion may be inaccurate. Consider using '#align padic_norm.sum_lt padicNorm.sum_ltₓ'. -/
theorem sum_lt {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
s.Nonempty → (∀ i ∈ s, padicNorm p (F i) < t) → padicNorm p (∑ i in s, F i) < t := by
classical
@@ -477,7 +482,6 @@ theorem sum_lt {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
(IH hs fun b hb => ht b (Finset.mem_insert_of_mem hb)))
· simp_all
#align padic_norm.sum_lt padicNorm.sum_lt
--/
/- warning: padic_norm.sum_le -> padicNorm.sum_le is a dubious translation:
lean 3 declaration is
@@ -499,7 +503,12 @@ theorem sum_le {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
· simp_all
#align padic_norm.sum_le padicNorm.sum_le
-#print padicNorm.sum_lt' /-
+/- warning: padic_norm.sum_lt' -> padicNorm.sum_lt' is a dubious translation:
+lean 3 declaration is
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] {α : Type.{u1}} {F : α -> Rat} {t : Rat} {s : Finset.{u1} α}, (forall (i : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) i s) -> (LT.lt.{0} Rat Rat.hasLt (padicNorm p (F i)) t)) -> (LT.lt.{0} Rat Rat.hasLt (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))) t) -> (LT.lt.{0} Rat Rat.hasLt (padicNorm p (Finset.sum.{0, u1} Rat α Rat.addCommMonoid s (fun (i : α) => F i))) t)
+but is expected to have type
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] {α : Type.{u1}} {F : α -> Rat} {t : Rat} {s : Finset.{u1} α}, (forall (i : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) i s) -> (LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (F i)) t)) -> (LT.lt.{0} Rat Rat.instLTRat_1 (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)) t) -> (LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (Finset.sum.{0, u1} Rat α Rat.addCommMonoid s (fun (i : α) => F i))) t)
+Case conversion may be inaccurate. Consider using '#align padic_norm.sum_lt' padicNorm.sum_lt'ₓ'. -/
theorem sum_lt' {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α}
(hF : ∀ i ∈ s, padicNorm p (F i) < t) (ht : 0 < t) : padicNorm p (∑ i in s, F i) < t :=
by
@@ -507,7 +516,6 @@ theorem sum_lt' {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α}
· simp [ht]
· exact sum_lt hs hF
#align padic_norm.sum_lt' padicNorm.sum_lt'
--/
/- warning: padic_norm.sum_le' -> padicNorm.sum_le' is a dubious translation:
lean 3 declaration is
mathlib commit https://github.com/leanprover-community/mathlib/commit/08e1d8d4d989df3a6df86f385e9053ec8a372cc1
@@ -64,7 +64,7 @@ variable {p : ℕ}
lean 3 declaration is
forall {p : Nat} {q : Rat}, (Ne.{1} Rat q (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero)))) -> (Eq.{1} Rat (padicNorm p q) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p) (Neg.neg.{0} Int Int.hasNeg (padicValRat p q))))
but is expected to have type
- forall {p : Nat} {q : Rat}, (Ne.{1} Rat q (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0))) -> (Eq.{1} Rat (padicNorm p q) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p) (Neg.neg.{0} Int Int.instNegInt (padicValRat p q))))
+ forall {p : Nat} {q : Rat}, (Ne.{1} Rat q (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0))) -> (Eq.{1} Rat (padicNorm p q) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) p) (Neg.neg.{0} Int Int.instNegInt (padicValRat p q))))
Case conversion may be inaccurate. Consider using '#align padic_norm.eq_zpow_of_nonzero padicNorm.eq_zpow_of_nonzeroₓ'. -/
/-- Unfolds the definition of the `p`-adic norm of `q` when `q ≠ 0`. -/
@[simp]
@@ -105,7 +105,7 @@ protected theorem one : padicNorm p 1 = 1 := by simp [padicNorm]
lean 3 declaration is
forall {p : Nat}, (LT.lt.{0} Nat Nat.hasLt (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))) p) -> (Eq.{1} Rat (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)) (Inv.inv.{0} Rat Rat.hasInv ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)))
but is expected to have type
- forall {p : Nat}, (LT.lt.{0} Nat instLTNat (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)) p) -> (Eq.{1} Rat (padicNorm p (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p)) (Inv.inv.{0} Rat Rat.instInvRat (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p)))
+ forall {p : Nat}, (LT.lt.{0} Nat instLTNat (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)) p) -> (Eq.{1} Rat (padicNorm p (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) p)) (Inv.inv.{0} Rat Rat.instInvRat (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) p)))
Case conversion may be inaccurate. Consider using '#align padic_norm.padic_norm_p padicNorm.padicNorm_pₓ'. -/
/-- The `p`-adic norm of `p` is `p⁻¹` if `p > 1`.
@@ -118,7 +118,7 @@ theorem padicNorm_p (hp : 1 < p) : padicNorm p p = p⁻¹ := by
lean 3 declaration is
forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)], Eq.{1} Rat (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)) (Inv.inv.{0} Rat Rat.hasInv ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p))
but is expected to have type
- forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)], Eq.{1} Rat (padicNorm p (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p)) (Inv.inv.{0} Rat Rat.instInvRat (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p))
+ forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)], Eq.{1} Rat (padicNorm p (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) p)) (Inv.inv.{0} Rat Rat.instInvRat (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) p))
Case conversion may be inaccurate. Consider using '#align padic_norm.padic_norm_p_of_prime padicNorm.padicNorm_p_of_primeₓ'. -/
/-- The `p`-adic norm of `p` is `p⁻¹` if `p` is prime.
@@ -132,7 +132,7 @@ theorem padicNorm_p_of_prime [Fact p.Prime] : padicNorm p p = p⁻¹ :=
lean 3 declaration is
forall {p : Nat} {q : Nat} [p_prime : Fact (Nat.Prime p)] [q_prime : Fact (Nat.Prime q)], (Ne.{1} Nat p q) -> (Eq.{1} Rat (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) q)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne))))
but is expected to have type
- forall {p : Nat} {q : Nat} [p_prime : Fact (Nat.Prime p)] [q_prime : Fact (Nat.Prime q)], (Ne.{1} Nat p q) -> (Eq.{1} Rat (padicNorm p (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) q)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))
+ forall {p : Nat} {q : Nat} [p_prime : Fact (Nat.Prime p)] [q_prime : Fact (Nat.Prime q)], (Ne.{1} Nat p q) -> (Eq.{1} Rat (padicNorm p (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) q)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))
Case conversion may be inaccurate. Consider using '#align padic_norm.padic_norm_of_prime_of_ne padicNorm.padicNorm_of_prime_of_neₓ'. -/
/-- 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]
@@ -146,7 +146,7 @@ theorem padicNorm_of_prime_of_ne {q : ℕ} [p_prime : Fact p.Prime] [q_prime : F
lean 3 declaration is
forall {p : Nat}, (LT.lt.{0} Nat Nat.hasLt (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))) p) -> (LT.lt.{0} Rat Rat.hasLt (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne))))
but is expected to have type
- forall {p : Nat}, (LT.lt.{0} Nat instLTNat (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)) p) -> (LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))
+ forall {p : Nat}, (LT.lt.{0} Nat instLTNat (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)) p) -> (LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) p)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))
Case conversion may be inaccurate. Consider using '#align padic_norm.padic_norm_p_lt_one padicNorm.padicNorm_p_lt_oneₓ'. -/
/-- The `p`-adic norm of `p` is less than `1` if `1 < p`.
@@ -161,7 +161,7 @@ theorem padicNorm_p_lt_one (hp : 1 < p) : padicNorm p p < 1 :=
lean 3 declaration is
forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)], LT.lt.{0} Rat Rat.hasLt (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))
but is expected to have type
- forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)], LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))
+ forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)], LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) p)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))
Case conversion may be inaccurate. Consider using '#align padic_norm.padic_norm_p_lt_one_of_prime padicNorm.padicNorm_p_lt_one_of_primeₓ'. -/
/-- The `p`-adic norm of `p` is less than `1` if `p` is prime.
@@ -174,7 +174,7 @@ theorem padicNorm_p_lt_one_of_prime [Fact p.Prime] : padicNorm p p < 1 :=
lean 3 declaration is
forall {p : Nat} {q : Rat}, (Ne.{1} Rat q (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero)))) -> (Exists.{1} Int (fun (z : Int) => Eq.{1} Rat (padicNorm p q) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p) (Neg.neg.{0} Int Int.hasNeg z))))
but is expected to have type
- forall {p : Nat} {q : Rat}, (Ne.{1} Rat q (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0))) -> (Exists.{1} Int (fun (z : Int) => Eq.{1} Rat (padicNorm p q) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p) (Neg.neg.{0} Int Int.instNegInt z))))
+ forall {p : Nat} {q : Rat}, (Ne.{1} Rat q (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0))) -> (Exists.{1} Int (fun (z : Int) => Eq.{1} Rat (padicNorm p q) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) p) (Neg.neg.{0} Int Int.instNegInt z))))
Case conversion may be inaccurate. Consider using '#align padic_norm.values_discrete padicNorm.values_discreteₓ'. -/
/-- `padic_norm p q` takes discrete values `p ^ -z` for `z : ℤ`. -/
protected theorem values_discrete {q : ℚ} (hq : q ≠ 0) : ∃ z : ℤ, padicNorm p q = p ^ (-z) :=
@@ -370,7 +370,7 @@ instance : IsAbsoluteValue (padicNorm p)
lean 3 declaration is
forall {p : Nat} [hp : Fact (Nat.Prime p)] {n : Nat} {z : Int}, Iff (Dvd.Dvd.{0} Int (semigroupDvd.{0} Int Int.semigroup) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat (Monoid.Pow.{0} Nat Nat.monoid)) p n)) z) (LE.le.{0} Rat Rat.hasLe (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) z)) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p) (Neg.neg.{0} Int Int.hasNeg ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) n))))
but is expected to have type
- forall {p : Nat} [hp : Fact (Nat.Prime p)] {n : Nat} {z : Int}, Iff (Dvd.dvd.{0} Int Int.instDvdInt (Nat.cast.{0} Int instNatCastInt (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat instPowNat) p n)) z) (LE.le.{0} Rat Rat.instLERat (padicNorm p (Int.cast.{0} Rat Rat.instIntCastRat z)) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p) (Neg.neg.{0} Int Int.instNegInt (Nat.cast.{0} Int instNatCastInt n))))
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] {n : Nat} {z : Int}, Iff (Dvd.dvd.{0} Int Int.instDvdInt (Nat.cast.{0} Int instNatCastInt (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat instPowNat) p n)) z) (LE.le.{0} Rat Rat.instLERat (padicNorm p (Int.cast.{0} Rat Rat.instIntCastRat z)) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) p) (Neg.neg.{0} Int Int.instNegInt (Nat.cast.{0} Int instNatCastInt n))))
Case conversion may be inaccurate. Consider using '#align padic_norm.dvd_iff_norm_le padicNorm.dvd_iff_norm_leₓ'. -/
theorem dvd_iff_norm_le {n : ℕ} {z : ℤ} : ↑(p ^ n) ∣ z ↔ padicNorm p z ≤ p ^ (-n : ℤ) :=
by
@@ -434,7 +434,7 @@ theorem int_lt_one_iff (m : ℤ) : padicNorm p m < 1 ↔ (p : ℤ) ∣ m :=
lean 3 declaration is
forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), LE.le.{0} Rat Rat.hasLe (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) m)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))
but is expected to have type
- forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), LE.le.{0} Rat Rat.instLERat (padicNorm p (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) m)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), LE.le.{0} Rat Rat.instLERat (padicNorm p (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) m)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))
Case conversion may be inaccurate. Consider using '#align padic_norm.of_nat padicNorm.of_natₓ'. -/
theorem of_nat (m : ℕ) : padicNorm p m ≤ 1 :=
padicNorm.of_int (m : ℤ)
@@ -444,7 +444,7 @@ theorem of_nat (m : ℕ) : padicNorm p m ≤ 1 :=
lean 3 declaration is
forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), Iff (Eq.{1} Rat (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) m)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))) (Not (Dvd.Dvd.{0} Nat Nat.hasDvd p m))
but is expected to have type
- forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), Iff (Eq.{1} Rat (padicNorm p (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) m)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))) (Not (Dvd.dvd.{0} Nat Nat.instDvdNat p m))
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), Iff (Eq.{1} Rat (padicNorm p (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) m)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))) (Not (Dvd.dvd.{0} Nat Nat.instDvdNat p m))
Case conversion may be inaccurate. Consider using '#align padic_norm.nat_eq_one_iff padicNorm.nat_eq_one_iffₓ'. -/
/-- 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 := by
@@ -455,7 +455,7 @@ theorem nat_eq_one_iff (m : ℕ) : padicNorm p m = 1 ↔ ¬p ∣ m := by
lean 3 declaration is
forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), Iff (LT.lt.{0} Rat Rat.hasLt (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) m)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))) (Dvd.Dvd.{0} Nat Nat.hasDvd p m)
but is expected to have type
- forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), Iff (LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) m)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))) (Dvd.dvd.{0} Nat Nat.instDvdNat p m)
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), Iff (LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) m)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))) (Dvd.dvd.{0} Nat Nat.instDvdNat p m)
Case conversion may be inaccurate. Consider using '#align padic_norm.nat_lt_one_iff padicNorm.nat_lt_one_iffₓ'. -/
theorem nat_lt_one_iff (m : ℕ) : padicNorm p m < 1 ↔ p ∣ m := by
simp only [← Int.coe_nat_dvd, ← int_lt_one_iff, Int.cast_ofNat]
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce86f4e05e9a9b8da5e316b22c76ce76440c56a1
@@ -62,7 +62,7 @@ variable {p : ℕ}
/- warning: padic_norm.eq_zpow_of_nonzero -> padicNorm.eq_zpow_of_nonzero is a dubious translation:
lean 3 declaration is
- forall {p : Nat} {q : Rat}, (Ne.{1} Rat q (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero)))) -> (Eq.{1} Rat (padicNorm p q) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p) (Neg.neg.{0} Int Int.hasNeg (padicValRat p q))))
+ forall {p : Nat} {q : Rat}, (Ne.{1} Rat q (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero)))) -> (Eq.{1} Rat (padicNorm p q) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p) (Neg.neg.{0} Int Int.hasNeg (padicValRat p q))))
but is expected to have type
forall {p : Nat} {q : Rat}, (Ne.{1} Rat q (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0))) -> (Eq.{1} Rat (padicNorm p q) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p) (Neg.neg.{0} Int Int.instNegInt (padicValRat p q))))
Case conversion may be inaccurate. Consider using '#align padic_norm.eq_zpow_of_nonzero padicNorm.eq_zpow_of_nonzeroₓ'. -/
@@ -103,7 +103,7 @@ protected theorem one : padicNorm p 1 = 1 := by simp [padicNorm]
/- warning: padic_norm.padic_norm_p -> padicNorm.padicNorm_p is a dubious translation:
lean 3 declaration is
- forall {p : Nat}, (LT.lt.{0} Nat Nat.hasLt (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))) p) -> (Eq.{1} Rat (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)) (Inv.inv.{0} Rat Rat.hasInv ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)))
+ forall {p : Nat}, (LT.lt.{0} Nat Nat.hasLt (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))) p) -> (Eq.{1} Rat (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)) (Inv.inv.{0} Rat Rat.hasInv ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)))
but is expected to have type
forall {p : Nat}, (LT.lt.{0} Nat instLTNat (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)) p) -> (Eq.{1} Rat (padicNorm p (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p)) (Inv.inv.{0} Rat Rat.instInvRat (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p)))
Case conversion may be inaccurate. Consider using '#align padic_norm.padic_norm_p padicNorm.padicNorm_pₓ'. -/
@@ -116,7 +116,7 @@ theorem padicNorm_p (hp : 1 < p) : padicNorm p p = p⁻¹ := by
/- warning: padic_norm.padic_norm_p_of_prime -> padicNorm.padicNorm_p_of_prime is a dubious translation:
lean 3 declaration is
- forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)], Eq.{1} Rat (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)) (Inv.inv.{0} Rat Rat.hasInv ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p))
+ forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)], Eq.{1} Rat (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)) (Inv.inv.{0} Rat Rat.hasInv ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p))
but is expected to have type
forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)], Eq.{1} Rat (padicNorm p (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p)) (Inv.inv.{0} Rat Rat.instInvRat (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p))
Case conversion may be inaccurate. Consider using '#align padic_norm.padic_norm_p_of_prime padicNorm.padicNorm_p_of_primeₓ'. -/
@@ -130,7 +130,7 @@ theorem padicNorm_p_of_prime [Fact p.Prime] : padicNorm p p = p⁻¹ :=
/- warning: padic_norm.padic_norm_of_prime_of_ne -> padicNorm.padicNorm_of_prime_of_ne is a dubious translation:
lean 3 declaration is
- forall {p : Nat} {q : Nat} [p_prime : Fact (Nat.Prime p)] [q_prime : Fact (Nat.Prime q)], (Ne.{1} Nat p q) -> (Eq.{1} Rat (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) q)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne))))
+ forall {p : Nat} {q : Nat} [p_prime : Fact (Nat.Prime p)] [q_prime : Fact (Nat.Prime q)], (Ne.{1} Nat p q) -> (Eq.{1} Rat (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) q)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne))))
but is expected to have type
forall {p : Nat} {q : Nat} [p_prime : Fact (Nat.Prime p)] [q_prime : Fact (Nat.Prime q)], (Ne.{1} Nat p q) -> (Eq.{1} Rat (padicNorm p (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) q)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))
Case conversion may be inaccurate. Consider using '#align padic_norm.padic_norm_of_prime_of_ne padicNorm.padicNorm_of_prime_of_neₓ'. -/
@@ -144,7 +144,7 @@ theorem padicNorm_of_prime_of_ne {q : ℕ} [p_prime : Fact p.Prime] [q_prime : F
/- warning: padic_norm.padic_norm_p_lt_one -> padicNorm.padicNorm_p_lt_one is a dubious translation:
lean 3 declaration is
- forall {p : Nat}, (LT.lt.{0} Nat Nat.hasLt (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))) p) -> (LT.lt.{0} Rat Rat.hasLt (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne))))
+ forall {p : Nat}, (LT.lt.{0} Nat Nat.hasLt (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))) p) -> (LT.lt.{0} Rat Rat.hasLt (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne))))
but is expected to have type
forall {p : Nat}, (LT.lt.{0} Nat instLTNat (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)) p) -> (LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))
Case conversion may be inaccurate. Consider using '#align padic_norm.padic_norm_p_lt_one padicNorm.padicNorm_p_lt_oneₓ'. -/
@@ -159,7 +159,7 @@ theorem padicNorm_p_lt_one (hp : 1 < p) : padicNorm p p < 1 :=
/- warning: padic_norm.padic_norm_p_lt_one_of_prime -> padicNorm.padicNorm_p_lt_one_of_prime is a dubious translation:
lean 3 declaration is
- forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)], LT.lt.{0} Rat Rat.hasLt (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))
+ forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)], LT.lt.{0} Rat Rat.hasLt (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))
but is expected to have type
forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)], LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))
Case conversion may be inaccurate. Consider using '#align padic_norm.padic_norm_p_lt_one_of_prime padicNorm.padicNorm_p_lt_one_of_primeₓ'. -/
@@ -172,7 +172,7 @@ theorem padicNorm_p_lt_one_of_prime [Fact p.Prime] : padicNorm p p < 1 :=
/- warning: padic_norm.values_discrete -> padicNorm.values_discrete is a dubious translation:
lean 3 declaration is
- forall {p : Nat} {q : Rat}, (Ne.{1} Rat q (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero)))) -> (Exists.{1} Int (fun (z : Int) => Eq.{1} Rat (padicNorm p q) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p) (Neg.neg.{0} Int Int.hasNeg z))))
+ forall {p : Nat} {q : Rat}, (Ne.{1} Rat q (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero)))) -> (Exists.{1} Int (fun (z : Int) => Eq.{1} Rat (padicNorm p q) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p) (Neg.neg.{0} Int Int.hasNeg z))))
but is expected to have type
forall {p : Nat} {q : Rat}, (Ne.{1} Rat q (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0))) -> (Exists.{1} Int (fun (z : Int) => Eq.{1} Rat (padicNorm p q) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p) (Neg.neg.{0} Int Int.instNegInt z))))
Case conversion may be inaccurate. Consider using '#align padic_norm.values_discrete padicNorm.values_discreteₓ'. -/
@@ -368,7 +368,7 @@ instance : IsAbsoluteValue (padicNorm p)
/- warning: padic_norm.dvd_iff_norm_le -> padicNorm.dvd_iff_norm_le is a dubious translation:
lean 3 declaration is
- forall {p : Nat} [hp : Fact (Nat.Prime p)] {n : Nat} {z : Int}, Iff (Dvd.Dvd.{0} Int (semigroupDvd.{0} Int Int.semigroup) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat (Monoid.Pow.{0} Nat Nat.monoid)) p n)) z) (LE.le.{0} Rat Rat.hasLe (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) z)) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p) (Neg.neg.{0} Int Int.hasNeg ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) n))))
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] {n : Nat} {z : Int}, Iff (Dvd.Dvd.{0} Int (semigroupDvd.{0} Int Int.semigroup) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat (Monoid.Pow.{0} Nat Nat.monoid)) p n)) z) (LE.le.{0} Rat Rat.hasLe (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) z)) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p) (Neg.neg.{0} Int Int.hasNeg ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) n))))
but is expected to have type
forall {p : Nat} [hp : Fact (Nat.Prime p)] {n : Nat} {z : Int}, Iff (Dvd.dvd.{0} Int Int.instDvdInt (Nat.cast.{0} Int instNatCastInt (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat instPowNat) p n)) z) (LE.le.{0} Rat Rat.instLERat (padicNorm p (Int.cast.{0} Rat Rat.instIntCastRat z)) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p) (Neg.neg.{0} Int Int.instNegInt (Nat.cast.{0} Int instNatCastInt n))))
Case conversion may be inaccurate. Consider using '#align padic_norm.dvd_iff_norm_le padicNorm.dvd_iff_norm_leₓ'. -/
@@ -432,7 +432,7 @@ theorem int_lt_one_iff (m : ℤ) : padicNorm p m < 1 ↔ (p : ℤ) ∣ m :=
/- warning: padic_norm.of_nat -> padicNorm.of_nat is a dubious translation:
lean 3 declaration is
- forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), LE.le.{0} Rat Rat.hasLe (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) m)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), LE.le.{0} Rat Rat.hasLe (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) m)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))
but is expected to have type
forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), LE.le.{0} Rat Rat.instLERat (padicNorm p (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) m)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))
Case conversion may be inaccurate. Consider using '#align padic_norm.of_nat padicNorm.of_natₓ'. -/
@@ -442,7 +442,7 @@ theorem of_nat (m : ℕ) : padicNorm p m ≤ 1 :=
/- warning: padic_norm.nat_eq_one_iff -> padicNorm.nat_eq_one_iff is a dubious translation:
lean 3 declaration is
- forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), Iff (Eq.{1} Rat (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) m)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))) (Not (Dvd.Dvd.{0} Nat Nat.hasDvd p m))
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), Iff (Eq.{1} Rat (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) m)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))) (Not (Dvd.Dvd.{0} Nat Nat.hasDvd p m))
but is expected to have type
forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), Iff (Eq.{1} Rat (padicNorm p (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) m)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))) (Not (Dvd.dvd.{0} Nat Nat.instDvdNat p m))
Case conversion may be inaccurate. Consider using '#align padic_norm.nat_eq_one_iff padicNorm.nat_eq_one_iffₓ'. -/
@@ -453,7 +453,7 @@ theorem nat_eq_one_iff (m : ℕ) : padicNorm p m = 1 ↔ ¬p ∣ m := by
/- warning: padic_norm.nat_lt_one_iff -> padicNorm.nat_lt_one_iff is a dubious translation:
lean 3 declaration is
- forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), Iff (LT.lt.{0} Rat Rat.hasLt (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) m)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))) (Dvd.Dvd.{0} Nat Nat.hasDvd p m)
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), Iff (LT.lt.{0} Rat Rat.hasLt (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) m)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))) (Dvd.Dvd.{0} Nat Nat.hasDvd p m)
but is expected to have type
forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), Iff (LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) m)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))) (Dvd.dvd.{0} Nat Nat.instDvdNat p m)
Case conversion may be inaccurate. Consider using '#align padic_norm.nat_lt_one_iff padicNorm.nat_lt_one_iffₓ'. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/55d771df074d0dd020139ee1cd4b95521422df9f
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Robert Y. Lewis
! This file was ported from Lean 3 source module number_theory.padics.padic_norm
-! leanprover-community/mathlib commit 92ca63f0fb391a9ca5f22d2409a6080e786d99f7
+! leanprover-community/mathlib commit cb3ceec8485239a61ed51d944cb9a95b68c6bafc
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -13,6 +13,9 @@ import Mathbin.NumberTheory.Padics.PadicVal
/-!
# p-adic norm
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
This file defines the `p`-adic norm on `ℚ`.
The `p`-adic valuation on `ℚ` is the difference of the multiplicities of `p` in the numerator and
mathlib commit https://github.com/leanprover-community/mathlib/commit/b19481deb571022990f1baa9cbf9172e6757a479
@@ -43,11 +43,13 @@ p-adic, p adic, padic, norm, valuation
-/
+#print padicNorm /-
/-- If `q ≠ 0`, the `p`-adic norm of a rational `q` is `p ^ -padic_val_rat p q`.
If `q = 0`, the `p`-adic norm of `q` is `0`. -/
def padicNorm (p : ℕ) (q : ℚ) : ℚ :=
if q = 0 then 0 else (p : ℚ) ^ (-padicValRat p q)
#align padic_norm padicNorm
+-/
namespace padicNorm
@@ -55,12 +57,24 @@ open padicValRat
variable {p : ℕ}
+/- warning: padic_norm.eq_zpow_of_nonzero -> padicNorm.eq_zpow_of_nonzero is a dubious translation:
+lean 3 declaration is
+ forall {p : Nat} {q : Rat}, (Ne.{1} Rat q (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero)))) -> (Eq.{1} Rat (padicNorm p q) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p) (Neg.neg.{0} Int Int.hasNeg (padicValRat p q))))
+but is expected to have type
+ forall {p : Nat} {q : Rat}, (Ne.{1} Rat q (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0))) -> (Eq.{1} Rat (padicNorm p q) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p) (Neg.neg.{0} Int Int.instNegInt (padicValRat p q))))
+Case conversion may be inaccurate. Consider using '#align padic_norm.eq_zpow_of_nonzero padicNorm.eq_zpow_of_nonzeroₓ'. -/
/-- 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) := by simp [hq, padicNorm]
#align padic_norm.eq_zpow_of_nonzero padicNorm.eq_zpow_of_nonzero
+/- warning: padic_norm.nonneg -> padicNorm.nonneg is a dubious translation:
+lean 3 declaration is
+ forall {p : Nat} (q : Rat), LE.le.{0} Rat Rat.hasLe (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))) (padicNorm p q)
+but is expected to have type
+ forall {p : Nat} (q : Rat), LE.le.{0} Rat Rat.instLERat (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)) (padicNorm p q)
+Case conversion may be inaccurate. Consider using '#align padic_norm.nonneg padicNorm.nonnegₓ'. -/
/-- The `p`-adic norm is nonnegative. -/
protected theorem nonneg (q : ℚ) : 0 ≤ padicNorm p q :=
if hq : q = 0 then by simp [hq, padicNorm]
@@ -70,16 +84,26 @@ protected theorem nonneg (q : ℚ) : 0 ≤ padicNorm p q :=
exact_mod_cast Nat.zero_le _
#align padic_norm.nonneg padicNorm.nonneg
+#print padicNorm.zero /-
/-- The `p`-adic norm of `0` is `0`. -/
@[simp]
protected theorem zero : padicNorm p 0 = 0 := by simp [padicNorm]
#align padic_norm.zero padicNorm.zero
+-/
+#print padicNorm.one /-
/-- The `p`-adic norm of `1` is `1`. -/
@[simp]
protected theorem one : padicNorm p 1 = 1 := by simp [padicNorm]
#align padic_norm.one padicNorm.one
+-/
+/- warning: padic_norm.padic_norm_p -> padicNorm.padicNorm_p is a dubious translation:
+lean 3 declaration is
+ forall {p : Nat}, (LT.lt.{0} Nat Nat.hasLt (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))) p) -> (Eq.{1} Rat (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)) (Inv.inv.{0} Rat Rat.hasInv ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)))
+but is expected to have type
+ forall {p : Nat}, (LT.lt.{0} Nat instLTNat (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)) p) -> (Eq.{1} Rat (padicNorm p (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p)) (Inv.inv.{0} Rat Rat.instInvRat (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p)))
+Case conversion may be inaccurate. Consider using '#align padic_norm.padic_norm_p padicNorm.padicNorm_pₓ'. -/
/-- The `p`-adic norm of `p` is `p⁻¹` if `p > 1`.
See also `padic_norm.padic_norm_p_of_prime` for a version assuming `p` is prime. -/
@@ -87,6 +111,12 @@ theorem padicNorm_p (hp : 1 < p) : padicNorm p p = p⁻¹ := by
simp [padicNorm, (pos_of_gt hp).ne', padicValNat.self hp]
#align padic_norm.padic_norm_p padicNorm.padicNorm_p
+/- warning: padic_norm.padic_norm_p_of_prime -> padicNorm.padicNorm_p_of_prime is a dubious translation:
+lean 3 declaration is
+ forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)], Eq.{1} Rat (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)) (Inv.inv.{0} Rat Rat.hasInv ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p))
+but is expected to have type
+ forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)], Eq.{1} Rat (padicNorm p (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p)) (Inv.inv.{0} Rat Rat.instInvRat (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p))
+Case conversion may be inaccurate. Consider using '#align padic_norm.padic_norm_p_of_prime padicNorm.padicNorm_p_of_primeₓ'. -/
/-- The `p`-adic norm of `p` is `p⁻¹` if `p` is prime.
See also `padic_norm.padic_norm_p` for a version assuming `1 < p`. -/
@@ -95,6 +125,12 @@ theorem padicNorm_p_of_prime [Fact p.Prime] : padicNorm p p = p⁻¹ :=
padicNorm_p <| Nat.Prime.one_lt (Fact.out _)
#align padic_norm.padic_norm_p_of_prime padicNorm.padicNorm_p_of_prime
+/- warning: padic_norm.padic_norm_of_prime_of_ne -> padicNorm.padicNorm_of_prime_of_ne is a dubious translation:
+lean 3 declaration is
+ forall {p : Nat} {q : Nat} [p_prime : Fact (Nat.Prime p)] [q_prime : Fact (Nat.Prime q)], (Ne.{1} Nat p q) -> (Eq.{1} Rat (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) q)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne))))
+but is expected to have type
+ forall {p : Nat} {q : Nat} [p_prime : Fact (Nat.Prime p)] [q_prime : Fact (Nat.Prime q)], (Ne.{1} Nat p q) -> (Eq.{1} Rat (padicNorm p (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) q)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))
+Case conversion may be inaccurate. Consider using '#align padic_norm.padic_norm_of_prime_of_ne padicNorm.padicNorm_of_prime_of_neₓ'. -/
/-- 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 :=
@@ -103,6 +139,12 @@ theorem padicNorm_of_prime_of_ne {q : ℕ} [p_prime : Fact p.Prime] [q_prime : F
simp [padicNorm, p, q_prime.1.1, q_prime.1.NeZero]
#align padic_norm.padic_norm_of_prime_of_ne padicNorm.padicNorm_of_prime_of_ne
+/- warning: padic_norm.padic_norm_p_lt_one -> padicNorm.padicNorm_p_lt_one is a dubious translation:
+lean 3 declaration is
+ forall {p : Nat}, (LT.lt.{0} Nat Nat.hasLt (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))) p) -> (LT.lt.{0} Rat Rat.hasLt (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne))))
+but is expected to have type
+ forall {p : Nat}, (LT.lt.{0} Nat instLTNat (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)) p) -> (LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))
+Case conversion may be inaccurate. Consider using '#align padic_norm.padic_norm_p_lt_one padicNorm.padicNorm_p_lt_oneₓ'. -/
/-- The `p`-adic norm of `p` is less than `1` if `1 < p`.
See also `padic_norm.padic_norm_p_lt_one_of_prime` for a version assuming `p` is prime. -/
@@ -112,6 +154,12 @@ theorem padicNorm_p_lt_one (hp : 1 < p) : padicNorm p p < 1 :=
exact_mod_cast Or.inr hp
#align padic_norm.padic_norm_p_lt_one padicNorm.padicNorm_p_lt_one
+/- warning: padic_norm.padic_norm_p_lt_one_of_prime -> padicNorm.padicNorm_p_lt_one_of_prime is a dubious translation:
+lean 3 declaration is
+ forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)], LT.lt.{0} Rat Rat.hasLt (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))
+but is expected to have type
+ forall {p : Nat} [_inst_1 : Fact (Nat.Prime p)], LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))
+Case conversion may be inaccurate. Consider using '#align padic_norm.padic_norm_p_lt_one_of_prime padicNorm.padicNorm_p_lt_one_of_primeₓ'. -/
/-- The `p`-adic norm of `p` is less than `1` if `p` is prime.
See also `padic_norm.padic_norm_p_lt_one` for a version assuming `1 < p`. -/
@@ -119,21 +167,30 @@ theorem padicNorm_p_lt_one_of_prime [Fact p.Prime] : padicNorm p p < 1 :=
padicNorm_p_lt_one <| Nat.Prime.one_lt (Fact.out _)
#align padic_norm.padic_norm_p_lt_one_of_prime padicNorm.padicNorm_p_lt_one_of_prime
+/- warning: padic_norm.values_discrete -> padicNorm.values_discrete is a dubious translation:
+lean 3 declaration is
+ forall {p : Nat} {q : Rat}, (Ne.{1} Rat q (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero)))) -> (Exists.{1} Int (fun (z : Int) => Eq.{1} Rat (padicNorm p q) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p) (Neg.neg.{0} Int Int.hasNeg z))))
+but is expected to have type
+ forall {p : Nat} {q : Rat}, (Ne.{1} Rat q (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0))) -> (Exists.{1} Int (fun (z : Int) => Eq.{1} Rat (padicNorm p q) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p) (Neg.neg.{0} Int Int.instNegInt z))))
+Case conversion may be inaccurate. Consider using '#align padic_norm.values_discrete padicNorm.values_discreteₓ'. -/
/-- `padic_norm p q` takes discrete values `p ^ -z` for `z : ℤ`. -/
protected theorem values_discrete {q : ℚ} (hq : q ≠ 0) : ∃ z : ℤ, padicNorm p q = p ^ (-z) :=
⟨padicValRat p q, by simp [padicNorm, hq]⟩
#align padic_norm.values_discrete padicNorm.values_discrete
+#print padicNorm.neg /-
/-- `padic_norm p` is symmetric. -/
@[simp]
protected theorem neg (q : ℚ) : padicNorm p (-q) = padicNorm p q :=
if hq : q = 0 then by simp [hq] else by simp [padicNorm, hq]
#align padic_norm.neg padicNorm.neg
+-/
variable [hp : Fact p.Prime]
include hp
+#print padicNorm.nonzero /-
/-- If `q ≠ 0`, then `padic_norm p q ≠ 0`. -/
protected theorem nonzero {q : ℚ} (hq : q ≠ 0) : padicNorm p q ≠ 0 :=
by
@@ -141,7 +198,9 @@ protected theorem nonzero {q : ℚ} (hq : q ≠ 0) : padicNorm p q ≠ 0 :=
apply zpow_ne_zero_of_ne_zero
exact_mod_cast ne_of_gt hp.1.Pos
#align padic_norm.nonzero padicNorm.nonzero
+-/
+#print padicNorm.zero_of_padicNorm_eq_zero /-
/-- 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 :=
by
@@ -151,7 +210,9 @@ theorem zero_of_padicNorm_eq_zero {q : ℚ} (h : padicNorm p q = 0) : q = 0 :=
apply zpow_ne_zero_of_ne_zero
exact_mod_cast hp.1.NeZero
#align padic_norm.zero_of_padic_norm_eq_zero padicNorm.zero_of_padicNorm_eq_zero
+-/
+#print padicNorm.mul /-
/-- The `p`-adic norm is multiplicative. -/
@[simp]
protected theorem mul (q r : ℚ) : padicNorm p (q * r) = padicNorm p q * padicNorm p r :=
@@ -163,14 +224,23 @@ protected theorem mul (q r : ℚ) : padicNorm p (q * r) = padicNorm p q * padicN
have : (p : ℚ) ≠ 0 := by simp [hp.1.NeZero]
simp [padicNorm, *, padicValRat.mul, zpow_add₀ this, mul_comm]
#align padic_norm.mul padicNorm.mul
+-/
+#print padicNorm.div /-
/-- The `p`-adic norm respects division. -/
@[simp]
protected theorem div (q r : ℚ) : padicNorm p (q / r) = padicNorm p q / padicNorm p r :=
if hr : r = 0 then by simp [hr]
else eq_div_of_mul_eq (padicNorm.nonzero hr) (by rw [← padicNorm.mul, div_mul_cancel _ hr])
#align padic_norm.div padicNorm.div
+-/
+/- warning: padic_norm.of_int -> padicNorm.of_int is a dubious translation:
+lean 3 declaration is
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] (z : Int), LE.le.{0} Rat Rat.hasLe (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) z)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))
+but is expected to have type
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] (z : Int), LE.le.{0} Rat Rat.instLERat (padicNorm p (Int.cast.{0} Rat Rat.instIntCastRat z)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))
+Case conversion may be inaccurate. Consider using '#align padic_norm.of_int padicNorm.of_intₓ'. -/
/-- The `p`-adic norm of an integer is at most `1`. -/
protected theorem of_int (z : ℤ) : padicNorm p z ≤ 1 :=
if hz : z = 0 then by simp [hz, zero_le_one]
@@ -206,6 +276,12 @@ private theorem nonarchimedean_aux {q r : ℚ} (h : padicValRat p q ≤ padicVal
apply min_le_padic_val_rat_add <;> assumption
#align padic_norm.nonarchimedean_aux padic_norm.nonarchimedean_aux
+/- warning: padic_norm.nonarchimedean -> padicNorm.nonarchimedean is a dubious translation:
+lean 3 declaration is
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] {q : Rat} {r : Rat}, LE.le.{0} Rat Rat.hasLe (padicNorm p (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.hasAdd) q r)) (LinearOrder.max.{0} Rat Rat.linearOrder (padicNorm p q) (padicNorm p r))
+but is expected to have type
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] {q : Rat} {r : Rat}, LE.le.{0} Rat Rat.instLERat (padicNorm p (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.instAddRat) q r)) (Max.max.{0} Rat (LinearOrderedRing.toMax.{0} Rat Rat.instLinearOrderedRingRat) (padicNorm p q) (padicNorm p r))
+Case conversion may be inaccurate. Consider using '#align padic_norm.nonarchimedean padicNorm.nonarchimedeanₓ'. -/
/-- 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 : ℚ} :
@@ -217,6 +293,12 @@ protected theorem nonarchimedean {q r : ℚ} :
exact nonarchimedean_aux hle
#align padic_norm.nonarchimedean padicNorm.nonarchimedean
+/- warning: padic_norm.triangle_ineq -> padicNorm.triangle_ineq is a dubious translation:
+lean 3 declaration is
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] (q : Rat) (r : Rat), LE.le.{0} Rat Rat.hasLe (padicNorm p (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.hasAdd) q r)) (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.hasAdd) (padicNorm p q) (padicNorm p r))
+but is expected to have type
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] (q : Rat) (r : Rat), LE.le.{0} Rat Rat.instLERat (padicNorm p (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.instAddRat) q r)) (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.instAddRat) (padicNorm p q) (padicNorm p r))
+Case conversion may be inaccurate. Consider using '#align padic_norm.triangle_ineq padicNorm.triangle_ineqₓ'. -/
/-- 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 :=
@@ -227,12 +309,24 @@ theorem triangle_ineq (q r : ℚ) : padicNorm p (q + r) ≤ padicNorm p q + padi
#align padic_norm.triangle_ineq padicNorm.triangle_ineq
+/- warning: padic_norm.sub -> padicNorm.sub is a dubious translation:
+lean 3 declaration is
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] {q : Rat} {r : Rat}, LE.le.{0} Rat Rat.hasLe (padicNorm p (HSub.hSub.{0, 0, 0} Rat Rat Rat (instHSub.{0} Rat (SubNegMonoid.toHasSub.{0} Rat (AddGroup.toSubNegMonoid.{0} Rat Rat.addGroup))) q r)) (LinearOrder.max.{0} Rat Rat.linearOrder (padicNorm p q) (padicNorm p r))
+but is expected to have type
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] {q : Rat} {r : Rat}, LE.le.{0} Rat Rat.instLERat (padicNorm p (HSub.hSub.{0, 0, 0} Rat Rat Rat (instHSub.{0} Rat Rat.instSubRat) q r)) (Max.max.{0} Rat (LinearOrderedRing.toMax.{0} Rat Rat.instLinearOrderedRingRat) (padicNorm p q) (padicNorm p r))
+Case conversion may be inaccurate. Consider using '#align padic_norm.sub padicNorm.subₓ'. -/
/-- 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) := by
rw [sub_eq_add_neg, ← padicNorm.neg r] <;> apply padicNorm.nonarchimedean
#align padic_norm.sub padicNorm.sub
+/- warning: padic_norm.add_eq_max_of_ne -> padicNorm.add_eq_max_of_ne is a dubious translation:
+lean 3 declaration is
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] {q : Rat} {r : Rat}, (Ne.{1} Rat (padicNorm p q) (padicNorm p r)) -> (Eq.{1} Rat (padicNorm p (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.hasAdd) q r)) (LinearOrder.max.{0} Rat Rat.linearOrder (padicNorm p q) (padicNorm p r)))
+but is expected to have type
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] {q : Rat} {r : Rat}, (Ne.{1} Rat (padicNorm p q) (padicNorm p r)) -> (Eq.{1} Rat (padicNorm p (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.instAddRat) q r)) (Max.max.{0} Rat (LinearOrderedRing.toMax.{0} Rat Rat.instLinearOrderedRingRat) (padicNorm p q) (padicNorm p r)))
+Case conversion may be inaccurate. Consider using '#align padic_norm.add_eq_max_of_ne padicNorm.add_eq_max_of_neₓ'. -/
/-- 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) :
@@ -269,6 +363,12 @@ instance : IsAbsoluteValue (padicNorm p)
abv_add := padicNorm.triangle_ineq
abv_mul := padicNorm.mul
+/- warning: padic_norm.dvd_iff_norm_le -> padicNorm.dvd_iff_norm_le is a dubious translation:
+lean 3 declaration is
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] {n : Nat} {z : Int}, Iff (Dvd.Dvd.{0} Int (semigroupDvd.{0} Int Int.semigroup) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat (Monoid.Pow.{0} Nat Nat.monoid)) p n)) z) (LE.le.{0} Rat Rat.hasLe (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) z)) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) p) (Neg.neg.{0} Int Int.hasNeg ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) n))))
+but is expected to have type
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] {n : Nat} {z : Int}, Iff (Dvd.dvd.{0} Int Int.instDvdInt (Nat.cast.{0} Int instNatCastInt (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat instPowNat) p n)) z) (LE.le.{0} Rat Rat.instLERat (padicNorm p (Int.cast.{0} Rat Rat.instIntCastRat z)) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) p) (Neg.neg.{0} Int Int.instNegInt (Nat.cast.{0} Int instNatCastInt n))))
+Case conversion may be inaccurate. Consider using '#align padic_norm.dvd_iff_norm_le padicNorm.dvd_iff_norm_leₓ'. -/
theorem dvd_iff_norm_le {n : ℕ} {z : ℤ} : ↑(p ^ n) ∣ z ↔ padicNorm p z ≤ p ^ (-n : ℤ) :=
by
unfold padicNorm; split_ifs with hz
@@ -286,6 +386,12 @@ theorem dvd_iff_norm_le {n : ℕ} {z : ℤ} : ↑(p ^ n) ∣ z ↔ padicNorm p z
· exact_mod_cast hp.1.one_lt
#align padic_norm.dvd_iff_norm_le padicNorm.dvd_iff_norm_le
+/- warning: padic_norm.int_eq_one_iff -> padicNorm.int_eq_one_iff is a dubious translation:
+lean 3 declaration is
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Int), Iff (Eq.{1} Rat (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) m)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))) (Not (Dvd.Dvd.{0} Int (semigroupDvd.{0} Int Int.semigroup) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) p) m))
+but is expected to have type
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Int), Iff (Eq.{1} Rat (padicNorm p (Int.cast.{0} Rat Rat.instIntCastRat m)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))) (Not (Dvd.dvd.{0} Int Int.instDvdInt (Nat.cast.{0} Int instNatCastInt p) m))
+Case conversion may be inaccurate. Consider using '#align padic_norm.int_eq_one_iff padicNorm.int_eq_one_iffₓ'. -/
/-- 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 :=
by
@@ -309,27 +415,52 @@ theorem int_eq_one_iff (m : ℤ) : padicNorm p m = 1 ↔ ¬(p : ℤ) ∣ m :=
rw [← zpow_zero (p : ℚ), zpow_inj] <;> linarith
#align padic_norm.int_eq_one_iff padicNorm.int_eq_one_iff
+/- warning: padic_norm.int_lt_one_iff -> padicNorm.int_lt_one_iff is a dubious translation:
+lean 3 declaration is
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Int), Iff (LT.lt.{0} Rat Rat.hasLt (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) m)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))) (Dvd.Dvd.{0} Int (semigroupDvd.{0} Int Int.semigroup) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) p) m)
+but is expected to have type
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Int), Iff (LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (Int.cast.{0} Rat Rat.instIntCastRat m)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))) (Dvd.dvd.{0} Int Int.instDvdInt (Nat.cast.{0} Int instNatCastInt p) m)
+Case conversion may be inaccurate. Consider using '#align padic_norm.int_lt_one_iff padicNorm.int_lt_one_iffₓ'. -/
theorem int_lt_one_iff (m : ℤ) : padicNorm p m < 1 ↔ (p : ℤ) ∣ m :=
by
rw [← not_iff_not, ← int_eq_one_iff, eq_iff_le_not_lt]
simp only [padicNorm.of_int, true_and_iff]
#align padic_norm.int_lt_one_iff padicNorm.int_lt_one_iff
+/- warning: padic_norm.of_nat -> padicNorm.of_nat is a dubious translation:
+lean 3 declaration is
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), LE.le.{0} Rat Rat.hasLe (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) m)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))
+but is expected to have type
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), LE.le.{0} Rat Rat.instLERat (padicNorm p (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) m)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))
+Case conversion may be inaccurate. Consider using '#align padic_norm.of_nat padicNorm.of_natₓ'. -/
theorem of_nat (m : ℕ) : padicNorm p m ≤ 1 :=
padicNorm.of_int (m : ℤ)
#align padic_norm.of_nat padicNorm.of_nat
+/- warning: padic_norm.nat_eq_one_iff -> padicNorm.nat_eq_one_iff is a dubious translation:
+lean 3 declaration is
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), Iff (Eq.{1} Rat (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) m)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))) (Not (Dvd.Dvd.{0} Nat Nat.hasDvd p m))
+but is expected to have type
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), Iff (Eq.{1} Rat (padicNorm p (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) m)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))) (Not (Dvd.dvd.{0} Nat Nat.instDvdNat p m))
+Case conversion may be inaccurate. Consider using '#align padic_norm.nat_eq_one_iff padicNorm.nat_eq_one_iffₓ'. -/
/-- 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 := by
simp only [← Int.coe_nat_dvd, ← int_eq_one_iff, Int.cast_ofNat]
#align padic_norm.nat_eq_one_iff padicNorm.nat_eq_one_iff
+/- warning: padic_norm.nat_lt_one_iff -> padicNorm.nat_lt_one_iff is a dubious translation:
+lean 3 declaration is
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), Iff (LT.lt.{0} Rat Rat.hasLt (padicNorm p ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) m)) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))) (Dvd.Dvd.{0} Nat Nat.hasDvd p m)
+but is expected to have type
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] (m : Nat), Iff (LT.lt.{0} Rat Rat.instLTRat_1 (padicNorm p (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing))) m)) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))) (Dvd.dvd.{0} Nat Nat.instDvdNat p m)
+Case conversion may be inaccurate. Consider using '#align padic_norm.nat_lt_one_iff padicNorm.nat_lt_one_iffₓ'. -/
theorem nat_lt_one_iff (m : ℕ) : padicNorm p m < 1 ↔ p ∣ m := by
simp only [← Int.coe_nat_dvd, ← int_lt_one_iff, Int.cast_ofNat]
#align padic_norm.nat_lt_one_iff padicNorm.nat_lt_one_iff
open BigOperators
+#print padicNorm.sum_lt /-
theorem sum_lt {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
s.Nonempty → (∀ i ∈ s, padicNorm p (F i) < t) → padicNorm p (∑ i in s, F i) < t := by
classical
@@ -343,7 +474,14 @@ theorem sum_lt {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
(IH hs fun b hb => ht b (Finset.mem_insert_of_mem hb)))
· simp_all
#align padic_norm.sum_lt padicNorm.sum_lt
+-/
+/- warning: padic_norm.sum_le -> padicNorm.sum_le is a dubious translation:
+lean 3 declaration is
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] {α : Type.{u1}} {F : α -> Rat} {t : Rat} {s : Finset.{u1} α}, (Finset.Nonempty.{u1} α s) -> (forall (i : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) i s) -> (LE.le.{0} Rat Rat.hasLe (padicNorm p (F i)) t)) -> (LE.le.{0} Rat Rat.hasLe (padicNorm p (Finset.sum.{0, u1} Rat α Rat.addCommMonoid s (fun (i : α) => F i))) t)
+but is expected to have type
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] {α : Type.{u1}} {F : α -> Rat} {t : Rat} {s : Finset.{u1} α}, (Finset.Nonempty.{u1} α s) -> (forall (i : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) i s) -> (LE.le.{0} Rat Rat.instLERat (padicNorm p (F i)) t)) -> (LE.le.{0} Rat Rat.instLERat (padicNorm p (Finset.sum.{0, u1} Rat α Rat.addCommMonoid s (fun (i : α) => F i))) t)
+Case conversion may be inaccurate. Consider using '#align padic_norm.sum_le padicNorm.sum_leₓ'. -/
theorem sum_le {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
s.Nonempty → (∀ i ∈ s, padicNorm p (F i) ≤ t) → padicNorm p (∑ i in s, F i) ≤ t := by
classical
@@ -358,6 +496,7 @@ theorem sum_le {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
· simp_all
#align padic_norm.sum_le padicNorm.sum_le
+#print padicNorm.sum_lt' /-
theorem sum_lt' {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α}
(hF : ∀ i ∈ s, padicNorm p (F i) < t) (ht : 0 < t) : padicNorm p (∑ i in s, F i) < t :=
by
@@ -365,7 +504,14 @@ theorem sum_lt' {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α}
· simp [ht]
· exact sum_lt hs hF
#align padic_norm.sum_lt' padicNorm.sum_lt'
+-/
+/- warning: padic_norm.sum_le' -> padicNorm.sum_le' is a dubious translation:
+lean 3 declaration is
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] {α : Type.{u1}} {F : α -> Rat} {t : Rat} {s : Finset.{u1} α}, (forall (i : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) i s) -> (LE.le.{0} Rat Rat.hasLe (padicNorm p (F i)) t)) -> (LE.le.{0} Rat Rat.hasLe (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))) t) -> (LE.le.{0} Rat Rat.hasLe (padicNorm p (Finset.sum.{0, u1} Rat α Rat.addCommMonoid s (fun (i : α) => F i))) t)
+but is expected to have type
+ forall {p : Nat} [hp : Fact (Nat.Prime p)] {α : Type.{u1}} {F : α -> Rat} {t : Rat} {s : Finset.{u1} α}, (forall (i : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) i s) -> (LE.le.{0} Rat Rat.instLERat (padicNorm p (F i)) t)) -> (LE.le.{0} Rat Rat.instLERat (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)) t) -> (LE.le.{0} Rat Rat.instLERat (padicNorm p (Finset.sum.{0, u1} Rat α Rat.addCommMonoid s (fun (i : α) => F i))) t)
+Case conversion may be inaccurate. Consider using '#align padic_norm.sum_le' padicNorm.sum_le'ₓ'. -/
theorem sum_le' {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α}
(hF : ∀ i ∈ s, padicNorm p (F i) ≤ t) (ht : 0 ≤ t) : padicNorm p (∑ i in s, F i) ≤ t :=
by
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
OfNat
and Nat.cast
lemmas (#11861)
This renames
Int.cast_ofNat
to Int.cast_natCast
Int.int_cast_ofNat
to Int.cast_ofNat
I think the history here is that this lemma was previously about Int.ofNat
, before we globally fixed the simp-normal form to be Nat.cast
.
Since the Int.cast_ofNat
name is repurposed, it can't be deprecated. Int.int_cast_ofNat
is such a wonky name that it was probably never used.
@@ -268,7 +268,7 @@ theorem dvd_iff_norm_le {n : ℕ} {z : ℤ} : ↑(p ^ n) ∣ z ↔ padicNorm p z
/-- 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 := by
nth_rw 2 [← pow_one p]
- simp only [dvd_iff_norm_le, Int.cast_ofNat, Nat.cast_one, zpow_neg, zpow_one, not_le]
+ simp only [dvd_iff_norm_le, Int.cast_natCast, Nat.cast_one, zpow_neg, zpow_one, not_le]
constructor
· intro h
rw [h, inv_lt_one_iff_of_pos] <;> norm_cast
@@ -297,11 +297,11 @@ theorem of_nat (m : ℕ) : padicNorm p m ≤ 1 :=
/-- 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 := by
- rw [← Int.natCast_dvd_natCast, ← int_eq_one_iff, Int.cast_ofNat]
+ rw [← Int.natCast_dvd_natCast, ← int_eq_one_iff, Int.cast_natCast]
#align padic_norm.nat_eq_one_iff padicNorm.nat_eq_one_iff
theorem nat_lt_one_iff (m : ℕ) : padicNorm p m < 1 ↔ p ∣ m := by
- rw [← Int.natCast_dvd_natCast, ← int_lt_one_iff, Int.cast_ofNat]
+ rw [← Int.natCast_dvd_natCast, ← int_lt_one_iff, Int.cast_natCast]
#align padic_norm.nat_lt_one_iff padicNorm.nat_lt_one_iff
/-- If a rational is not a p-adic integer, it is not an integer. -/
coe_nat
to natCast
(#11637)
Reduce the diff of #11499
All in the Int
namespace:
ofNat_eq_cast
→ ofNat_eq_natCast
cast_eq_cast_iff_Nat
→ natCast_inj
natCast_eq_ofNat
→ ofNat_eq_natCast
coe_nat_sub
→ natCast_sub
coe_nat_nonneg
→ natCast_nonneg
sign_coe_add_one
→ sign_natCast_add_one
nat_succ_eq_int_succ
→ natCast_succ
succ_neg_nat_succ
→ succ_neg_natCast_succ
coe_pred_of_pos
→ natCast_pred_of_pos
coe_nat_div
→ natCast_div
coe_nat_ediv
→ natCast_ediv
sign_coe_nat_of_nonzero
→ sign_natCast_of_ne_zero
toNat_coe_nat
→ toNat_natCast
toNat_coe_nat_add_one
→ toNat_natCast_add_one
coe_nat_dvd
→ natCast_dvd_natCast
coe_nat_dvd_left
→ natCast_dvd
coe_nat_dvd_right
→ dvd_natCast
le_coe_nat_sub
→ le_natCast_sub
succ_coe_nat_pos
→ succ_natCast_pos
coe_nat_modEq_iff
→ natCast_modEq_iff
coe_natAbs
→ natCast_natAbs
coe_nat_eq_zero
→ natCast_eq_zero
coe_nat_ne_zero
→ natCast_ne_zero
coe_nat_ne_zero_iff_pos
→ natCast_ne_zero_iff_pos
abs_coe_nat
→ abs_natCast
coe_nat_nonpos_iff
→ natCast_nonpos_iff
Also rename Nat.coe_nat_dvd
to Nat.cast_dvd_cast
@@ -297,11 +297,11 @@ theorem of_nat (m : ℕ) : padicNorm p m ≤ 1 :=
/-- 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 := by
- rw [← Int.coe_nat_dvd, ← int_eq_one_iff, Int.cast_ofNat]
+ rw [← Int.natCast_dvd_natCast, ← int_eq_one_iff, Int.cast_ofNat]
#align padic_norm.nat_eq_one_iff padicNorm.nat_eq_one_iff
theorem nat_lt_one_iff (m : ℕ) : padicNorm p m < 1 ↔ p ∣ m := by
- rw [← Int.coe_nat_dvd, ← int_lt_one_iff, Int.cast_ofNat]
+ rw [← Int.natCast_dvd_natCast, ← int_lt_one_iff, Int.cast_ofNat]
#align padic_norm.nat_lt_one_iff padicNorm.nat_lt_one_iff
/-- If a rational is not a p-adic integer, it is not an integer. -/
mul
-div
cancellation lemmas (#11530)
Lemma names around cancellation of multiplication and division are a mess.
This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the GroupWithZero
lemma name, the Group
lemma, the AddGroup
lemma name).
| Statement | New name | Old name | |
@@ -157,7 +157,7 @@ protected theorem mul (q r : ℚ) : padicNorm p (q * r) = padicNorm p q * padicN
@[simp]
protected theorem div (q r : ℚ) : padicNorm p (q / r) = padicNorm p q / padicNorm p r :=
if hr : r = 0 then by simp [hr]
- else eq_div_of_mul_eq (padicNorm.nonzero hr) (by rw [← padicNorm.mul, div_mul_cancel _ hr])
+ else eq_div_of_mul_eq (padicNorm.nonzero hr) (by rw [← padicNorm.mul, div_mul_cancel₀ _ hr])
#align padic_norm.div padicNorm.div
/-- The `p`-adic norm of an integer is at most `1`. -/
@@ -71,7 +71,7 @@ protected theorem zero : padicNorm p 0 = 0 := by simp [padicNorm]
#align padic_norm.zero padicNorm.zero
/-- The `p`-adic norm of `1` is `1`. -/
--- @[simp] -- Porting note: simp can prove this
+-- @[simp] -- Porting note (#10618): simp can prove this
protected theorem one : padicNorm p 1 = 1 := by simp [padicNorm]
#align padic_norm.one padicNorm.one
have
, replace
and suffices
(#10640)
No changes to tactic file, it's just boring fixes throughout the library.
This follows on from #6964.
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -281,8 +281,7 @@ theorem int_eq_one_iff (m : ℤ) : padicNorm p m = 1 ↔ ¬(p : ℤ) ∣ m := by
exact (Nat.not_lt_zero p h).elim
· have : 1 < (p : ℚ) := by norm_cast; exact Nat.Prime.one_lt (Fact.out : Nat.Prime p)
rw [← zpow_neg_one, zpow_lt_iff_lt this]
- have : 0 ≤ padicValRat p m
- simp only [of_int, Nat.cast_nonneg]
+ have : 0 ≤ padicValRat p m := by simp only [of_int, Nat.cast_nonneg]
intro h
rw [← zpow_zero (p : ℚ), zpow_inj] <;> linarith
#align padic_norm.int_eq_one_iff padicNorm.int_eq_one_iff
exact_mod_cast
tactic with mod_cast
elaborator where possible (#8404)
We still have the exact_mod_cast
tactic, used in a few places, which somehow (?) works a little bit harder to prevent the expected type influencing the elaboration of the term. I would like to get to the bottom of this, and it will be easier once the only usages of exact_mod_cast
are the ones that don't work using the term elaborator by itself.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -62,7 +62,7 @@ protected theorem nonneg (q : ℚ) : 0 ≤ padicNorm p q :=
unfold padicNorm
split_ifs
apply zpow_nonneg
- exact_mod_cast Nat.zero_le _
+ exact mod_cast Nat.zero_le _
#align padic_norm.nonneg padicNorm.nonneg
/-- The `p`-adic norm of `0` is `0`. -/
@@ -93,7 +93,7 @@ theorem padicNorm_p_of_prime [Fact p.Prime] : padicNorm p p = (p : ℚ)⁻¹ :=
/-- 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 := by
- have p : padicValRat p q = 0 := by exact_mod_cast padicValNat_primes neq
+ have p : padicValRat p q = 0 := mod_cast padicValNat_primes neq
rw [padicNorm, p]
simp [q_prime.1.ne_zero]
#align padic_norm.padic_norm_of_prime_of_ne padicNorm.padicNorm_of_prime_of_ne
@@ -103,7 +103,7 @@ theorem padicNorm_of_prime_of_ne {q : ℕ} [p_prime : Fact p.Prime] [q_prime : F
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 := by
rw [padicNorm_p hp, inv_lt_one_iff]
- exact_mod_cast Or.inr hp
+ exact mod_cast Or.inr hp
#align padic_norm.padic_norm_p_lt_one padicNorm.padicNorm_p_lt_one
/-- The `p`-adic norm of `p` is less than `1` if `p` is prime.
@@ -130,7 +130,7 @@ variable [hp : Fact p.Prime]
protected theorem nonzero {q : ℚ} (hq : q ≠ 0) : padicNorm p q ≠ 0 := by
rw [padicNorm.eq_zpow_of_nonzero hq]
apply zpow_ne_zero_of_ne_zero
- exact_mod_cast ne_of_gt hp.1.pos
+ exact mod_cast ne_of_gt hp.1.pos
#align padic_norm.nonzero padicNorm.nonzero
/-- If the `p`-adic norm of `q` is 0, then `q` is `0`. -/
@@ -139,7 +139,7 @@ theorem zero_of_padicNorm_eq_zero {q : ℚ} (h : padicNorm p q = 0) : q = 0 := b
unfold padicNorm at h; rw [if_neg hq] at h
apply absurd h
apply zpow_ne_zero_of_ne_zero
- exact_mod_cast hp.1.ne_zero
+ exact mod_cast hp.1.ne_zero
#align padic_norm.zero_of_padic_norm_eq_zero padicNorm.zero_of_padicNorm_eq_zero
/-- The `p`-adic norm is multiplicative. -/
@@ -167,11 +167,11 @@ protected theorem of_int (z : ℤ) : padicNorm p z ≤ 1 :=
unfold padicNorm
rw [if_neg _]
· refine' zpow_le_one_of_nonpos _ _
- · exact_mod_cast le_of_lt hp.1.one_lt
+ · exact mod_cast le_of_lt hp.1.one_lt
· rw [padicValRat.of_int, neg_nonpos]
norm_cast
simp
- exact_mod_cast hz
+ exact mod_cast hz
#align padic_norm.of_int padicNorm.of_int
private theorem nonarchimedean_aux {q r : ℚ} (h : padicValRat p q ≤ padicValRat p r) :
@@ -188,7 +188,7 @@ private theorem nonarchimedean_aux {q r : ℚ} (h : padicValRat p q ≤ padicVal
apply le_max_iff.2
left
apply zpow_le_of_le
- · exact_mod_cast le_of_lt hp.1.one_lt
+ · exact mod_cast le_of_lt hp.1.one_lt
· apply neg_le_neg
have : padicValRat p q = min (padicValRat p q) (padicValRat p r) := (min_eq_left h).symm
rw [this]
@@ -261,8 +261,8 @@ theorem dvd_iff_norm_le {n : ℕ} {z : ℤ} : ↑(p ^ n) ∣ z ↔ padicNorm p z
· norm_cast
rw [← PartENat.coe_le_coe, PartENat.natCast_get, ← multiplicity.pow_dvd_iff_le_multiplicity,
Nat.cast_pow]
- exact_mod_cast hz
- · exact_mod_cast hp.1.one_lt
+ exact mod_cast hz
+ · exact mod_cast hp.1.one_lt
#align padic_norm.dvd_iff_norm_le padicNorm.dvd_iff_norm_le
/-- The `p`-adic norm of an integer `m` is one iff `p` doesn't divide `m`. -/
The n-th Harmonic number is not an integer for n > 1. This proof uses 2-adic valuations.
@@ -305,6 +305,13 @@ theorem nat_lt_one_iff (m : ℕ) : padicNorm p m < 1 ↔ p ∣ m := by
rw [← Int.coe_nat_dvd, ← int_lt_one_iff, Int.cast_ofNat]
#align padic_norm.nat_lt_one_iff padicNorm.nat_lt_one_iff
+/-- 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 := by
+ contrapose! H
+ rw [Rat.eq_num_of_isInt H]
+ apply padicNorm.of_int
+
open BigOperators
theorem sum_lt {α : Type*} {F : α → ℚ} {t : ℚ} {s : Finset α} :
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -307,7 +307,7 @@ theorem nat_lt_one_iff (m : ℕ) : padicNorm p m < 1 ↔ p ∣ m := by
open BigOperators
-theorem sum_lt {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
+theorem sum_lt {α : Type*} {F : α → ℚ} {t : ℚ} {s : Finset α} :
s.Nonempty → (∀ i ∈ s, padicNorm p (F i) < t) → padicNorm p (∑ i in s, F i) < t := by
classical
refine' s.induction_on (by rintro ⟨-, ⟨⟩⟩) _
@@ -321,7 +321,7 @@ theorem sum_lt {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
· simp_all
#align padic_norm.sum_lt padicNorm.sum_lt
-theorem sum_le {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
+theorem sum_le {α : Type*} {F : α → ℚ} {t : ℚ} {s : Finset α} :
s.Nonempty → (∀ i ∈ s, padicNorm p (F i) ≤ t) → padicNorm p (∑ i in s, F i) ≤ t := by
classical
refine' s.induction_on (by rintro ⟨-, ⟨⟩⟩) _
@@ -335,14 +335,14 @@ theorem sum_le {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α} :
· simp_all
#align padic_norm.sum_le padicNorm.sum_le
-theorem sum_lt' {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α}
+theorem sum_lt' {α : Type*} {F : α → ℚ} {t : ℚ} {s : Finset α}
(hF : ∀ i ∈ s, padicNorm p (F i) < t) (ht : 0 < t) : padicNorm p (∑ i in s, F i) < t := by
obtain rfl | hs := Finset.eq_empty_or_nonempty s
· simp [ht]
· exact sum_lt hs hF
#align padic_norm.sum_lt' padicNorm.sum_lt'
-theorem sum_le' {α : Type _} {F : α → ℚ} {t : ℚ} {s : Finset α}
+theorem sum_le' {α : Type*} {F : α → ℚ} {t : ℚ} {s : Finset α}
(hF : ∀ i ∈ s, padicNorm p (F i) ≤ t) (ht : 0 ≤ t) : padicNorm p (∑ i in s, F i) ≤ t := by
obtain rfl | hs := Finset.eq_empty_or_nonempty s
· simp [ht]
@@ -2,15 +2,12 @@
Copyright (c) 2018 Robert Y. Lewis. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Robert Y. Lewis
-
-! This file was ported from Lean 3 source module number_theory.padics.padic_norm
-! leanprover-community/mathlib commit 92ca63f0fb391a9ca5f22d2409a6080e786d99f7
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Algebra.Order.Field.Power
import Mathlib.NumberTheory.Padics.PadicVal
+#align_import number_theory.padics.padic_norm from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7"
+
/-!
# p-adic norm
@@ -23,10 +23,6 @@ assumptions on `p`.
The valuation induces a norm on `ℚ`. This norm is a nonarchimedean absolute value.
It takes values in {0} ∪ {1/p^k | k ∈ ℤ}.
-## Notations
-
-This file uses the local notation `/.` for `rat.mk`.
-
## Implementation notes
Much, but not all, of this file assumes that `p` is prime. This assumption is inferred automatically
The unported dependencies are