@@ -18,6 +18,7 @@ and that `ℚ_p` is Cauchy complete.
18
18
19
19
* `padic` : the type of p-adic numbers
20
20
* `padic_norm_e` : the rational valued p-adic norm on `ℚ_p`
21
+ * `padic.add_valuation` : the additive `p`-adic valuation on `ℚ_p`, with values in `with_top ℤ`.
21
22
22
23
## Notation
23
24
@@ -1037,6 +1038,85 @@ begin
1037
1038
{ exact_mod_cast (fact.out p.prime).ne_zero }
1038
1039
end
1039
1040
1041
+ lemma valuation_map_add {x y : ℚ_[p]} (hxy : x + y ≠ 0 ) :
1042
+ min (valuation x) (valuation y) ≤ valuation (x + y) :=
1043
+ begin
1044
+ by_cases hx : x = 0 ,
1045
+ { rw [hx, zero_add],
1046
+ exact min_le_right _ _ },
1047
+ { by_cases hy : y = 0 ,
1048
+ { rw [hy, add_zero],
1049
+ exact min_le_left _ _ },
1050
+ { have h_norm : ∥x + y∥ ≤ (max ∥x∥ ∥y∥) := padic_norm_e.nonarchimedean x y,
1051
+ have hp_one : (1 : ℝ) < p,
1052
+ { rw [← nat.cast_one, nat.cast_lt],
1053
+ exact nat.prime.one_lt hp_prime.elim, },
1054
+ rw [norm_eq_pow_val hx, norm_eq_pow_val hy, norm_eq_pow_val hxy] at h_norm,
1055
+ exact min_le_of_zpow_le_max hp_one h_norm }}
1056
+ end
1057
+
1058
+ @[simp] lemma valuation_map_mul {x y : ℚ_[p]} (hx : x ≠ 0 ) (hy : y ≠ 0 ) :
1059
+ valuation (x * y) = valuation x + valuation y :=
1060
+ begin
1061
+ have h_norm : ∥x * y∥ = ∥x∥ * ∥y∥ := norm_mul x y,
1062
+ have hp_ne_one : (p : ℝ) ≠ 1 ,
1063
+ { rw [← nat.cast_one, ne.def, nat.cast_inj],
1064
+ exact nat.prime.ne_one hp_prime.elim, },
1065
+ have hp_pos : (0 : ℝ) < p,
1066
+ { rw [← nat.cast_zero, nat.cast_lt],
1067
+ exact nat.prime.pos hp_prime.elim },
1068
+ rw [norm_eq_pow_val hx, norm_eq_pow_val hy, norm_eq_pow_val (mul_ne_zero hx hy),
1069
+ ← zpow_add₀ (ne_of_gt hp_pos), zpow_inj hp_pos hp_ne_one, ← neg_add, neg_inj] at h_norm,
1070
+ exact h_norm,
1071
+ end
1072
+
1073
+ /-- The additive p-adic valuation on `ℚ_p`, with values in `with_top ℤ`. -/
1074
+ def add_valuation_def : ℚ_[p] → (with_top ℤ) :=
1075
+ λ x, if x = 0 then ⊤ else x.valuation
1076
+
1077
+ @[simp] lemma add_valuation.map_zero : add_valuation_def (0 : ℚ_[p]) = ⊤ :=
1078
+ by simp only [add_valuation_def, if_pos (eq.refl _)]
1079
+
1080
+ @[simp] lemma add_valuation.map_one : add_valuation_def (1 : ℚ_[p]) = 0 :=
1081
+ by simp only [add_valuation_def, if_neg (one_ne_zero), valuation_one,
1082
+ with_top.coe_zero]
1083
+
1084
+ lemma add_valuation.map_mul (x y : ℚ_[p]) :
1085
+ add_valuation_def (x * y) = add_valuation_def x + add_valuation_def y :=
1086
+ begin
1087
+ simp only [add_valuation_def],
1088
+ by_cases hx : x = 0 ,
1089
+ { rw [hx, if_pos (eq.refl _), zero_mul, if_pos (eq.refl _), with_top.top_add] },
1090
+ { by_cases hy : y = 0 ,
1091
+ { rw [hy, if_pos (eq.refl _), mul_zero, if_pos (eq.refl _), with_top.add_top] },
1092
+ { rw [if_neg hx, if_neg hy, if_neg (mul_ne_zero hx hy), ← with_top.coe_add,
1093
+ with_top.coe_eq_coe, valuation_map_mul hx hy] }}
1094
+ end
1095
+
1096
+ lemma add_valuation.map_add (x y : ℚ_[p]) :
1097
+ min (add_valuation_def x) (add_valuation_def y) ≤ add_valuation_def (x + y) :=
1098
+ begin
1099
+ simp only [add_valuation_def],
1100
+ by_cases hxy : x + y = 0 ,
1101
+ { rw [hxy, if_pos (eq.refl _)],
1102
+ exact le_top, },
1103
+ { by_cases hx : x = 0 ,
1104
+ { simp only [hx, if_pos (eq.refl _), min_eq_right, le_top, zero_add, le_refl] },
1105
+ { by_cases hy : y = 0 ,
1106
+ { simp only [hy, if_pos (eq.refl _), min_eq_left, le_top, add_zero, le_refl], },
1107
+ { rw [if_neg hx, if_neg hy, if_neg hxy, ← with_top.coe_min, with_top.coe_le_coe],
1108
+ exact valuation_map_add hxy }}}
1109
+ end
1110
+
1111
+ /-- The additive `p`-adic valuation on `ℚ_p`, as an `add_valuation`. -/
1112
+ def add_valuation : add_valuation ℚ_[p] (with_top ℤ) :=
1113
+ add_valuation.of add_valuation_def add_valuation.map_zero add_valuation.map_one
1114
+ add_valuation.map_add add_valuation.map_mul
1115
+
1116
+ @[simp] lemma add_valuation.apply {x : ℚ_[p]} (hx : x ≠ 0 ) :
1117
+ x.add_valuation = x.valuation :=
1118
+ by simp only [add_valuation, add_valuation.of_apply, add_valuation_def, if_neg hx]
1119
+
1040
1120
section norm_le_iff
1041
1121
/-! ### Various characterizations of open unit balls -/
1042
1122
lemma norm_le_pow_iff_norm_lt_pow_add_one (x : ℚ_[p]) (n : ℤ) :
0 commit comments