@@ -762,7 +762,7 @@ end algebra
762
762
763
763
section valuation
764
764
765
- variables [linear_ordered_add_comm_group Γ] [integral_domain R] [nontrivial R]
765
+ variables [linear_ordered_add_comm_group Γ] [integral_domain R]
766
766
767
767
instance : linear_ordered_comm_group (multiplicative Γ) :=
768
768
{ .. (infer_instance : linear_order (multiplicative Γ)),
822
822
823
823
end valuation
824
824
825
+ lemma is_pwo_Union_support_powers [linear_ordered_add_comm_group Γ] [integral_domain R]
826
+ {x : hahn_series Γ R} (hx : 0 < add_val Γ R x) :
827
+ (⋃ n : ℕ, (x ^ n).support).is_pwo :=
828
+ begin
829
+ apply (x.is_wf_support.is_pwo.add_submonoid_closure (λ g hg, _)).mono _,
830
+ { exact with_top.coe_le_coe.1 (le_trans (le_of_lt hx) (add_val_le_of_coeff_ne_zero hg)) },
831
+ refine set.Union_subset (λ n, _),
832
+ induction n with n ih;
833
+ intros g hn,
834
+ { simp only [exists_prop, and_true, set.mem_singleton_iff, set.set_of_eq_eq_singleton,
835
+ mem_support, ite_eq_right_iff, ne.def, not_false_iff, one_ne_zero,
836
+ pow_zero, not_forall, one_coeff] at hn,
837
+ rw [hn, set_like.mem_coe],
838
+ exact add_submonoid.zero_mem _ },
839
+ { obtain ⟨i, j, hi, hj, rfl⟩ := support_mul_subset_add_support hn,
840
+ exact set_like.mem_coe.2 (add_submonoid.add_mem _ (add_submonoid.subset_closure hi) (ih hj)) }
841
+ end
842
+
825
843
section
826
844
variables (Γ) (R) [partial_order Γ] [add_comm_monoid R]
827
845
@@ -1129,6 +1147,133 @@ end
1129
1147
1130
1148
end emb_domain
1131
1149
1150
+ section powers
1151
+
1152
+ variables [linear_ordered_add_comm_group Γ] [integral_domain R]
1153
+
1154
+ /-- The powers of an element of positive valuation form a summable family. -/
1155
+ def powers (x : hahn_series Γ R) (hx : 0 < add_val Γ R x) :
1156
+ summable_family Γ R ℕ :=
1157
+ { to_fun := λ n, x ^ n,
1158
+ is_pwo_Union_support' := is_pwo_Union_support_powers hx,
1159
+ finite_co_support' := λ g, begin
1160
+ have hpwo := (is_pwo_Union_support_powers hx),
1161
+ by_cases hg : g ∈ ⋃ n : ℕ, {g | (x ^ n).coeff g ≠ 0 },
1162
+ swap, { exact set.finite_empty.subset (λ n hn, hg (set.mem_Union.2 ⟨n, hn⟩)) },
1163
+ apply hpwo.is_wf.induction hg,
1164
+ intros y ys hy,
1165
+ refine ((((add_antidiagonal x.is_pwo_support hpwo y).finite_to_set.bUnion (λ ij hij,
1166
+ hy ij.snd _ _)).image nat.succ).union (set.finite_singleton 0 )).subset _,
1167
+ { exact (mem_add_antidiagonal.1 (mem_coe.1 hij)).2 .2 },
1168
+ { obtain ⟨rfl, hi, hj⟩ := mem_add_antidiagonal.1 (mem_coe.1 hij),
1169
+ rw [← zero_add ij.snd, ← add_assoc, add_zero],
1170
+ exact add_lt_add_right (with_top.coe_lt_coe.1
1171
+ (lt_of_lt_of_le hx (add_val_le_of_coeff_ne_zero hi))) _, },
1172
+ { intros n hn,
1173
+ cases n,
1174
+ { exact set.mem_union_right _ (set.mem_singleton 0 ) },
1175
+ { obtain ⟨i, j, hi, hj, rfl⟩ := support_mul_subset_add_support hn,
1176
+ refine set.mem_union_left _ ⟨n, set.mem_Union.2 ⟨⟨i, j⟩, set.mem_Union.2 ⟨_, hj⟩⟩, rfl⟩,
1177
+ simp only [true_and, set.mem_Union, mem_add_antidiagonal, mem_coe, eq_self_iff_true,
1178
+ ne.def, mem_support, set.mem_set_of_eq],
1179
+ exact ⟨hi, ⟨n, hj⟩⟩ } }
1180
+ end }
1181
+
1182
+ variables {x : hahn_series Γ R} (hx : 0 < add_val Γ R x)
1183
+
1184
+ @[simp] lemma coe_powers : ⇑(powers x hx) = pow x := rfl
1185
+
1186
+ lemma emb_domain_succ_smul_powers :
1187
+ (x • powers x hx).emb_domain ⟨nat.succ, nat.succ_injective⟩ =
1188
+ powers x hx - of_finsupp (finsupp.single 0 1 ) :=
1189
+ begin
1190
+ apply summable_family.ext (λ n, _),
1191
+ cases n,
1192
+ { rw [emb_domain_notin_range, sub_apply, coe_powers, pow_zero, coe_of_finsupp,
1193
+ finsupp.single_eq_same, sub_self],
1194
+ rw [set.mem_range, not_exists],
1195
+ exact nat.succ_ne_zero },
1196
+ { refine eq.trans (emb_domain_image _ ⟨nat.succ, nat.succ_injective⟩) _,
1197
+ simp only [pow_succ, coe_powers, coe_sub, smul_apply, coe_of_finsupp, pi.sub_apply],
1198
+ rw [finsupp.single_eq_of_ne (n.succ_ne_zero).symm, sub_zero] }
1199
+ end
1200
+
1201
+ lemma one_sub_self_mul_hsum_powers :
1202
+ (1 - x) * (powers x hx).hsum = 1 :=
1203
+ begin
1204
+ rw [← hsum_smul, sub_smul, one_smul, hsum_sub,
1205
+ ← hsum_emb_domain (x • powers x hx) ⟨nat.succ, nat.succ_injective⟩,
1206
+ emb_domain_succ_smul_powers],
1207
+ simp,
1208
+ end
1209
+
1210
+ end powers
1211
+
1132
1212
end summable_family
1133
1213
1214
+ section inversion
1215
+
1216
+ variables [linear_ordered_add_comm_group Γ]
1217
+
1218
+ section integral_domain
1219
+ variable [integral_domain R]
1220
+
1221
+ lemma unit_aux (x : hahn_series Γ R) {r : R} (hr : r * x.coeff x.order = 1 ) :
1222
+ 0 < add_val Γ R (1 - C r * (single (- x.order) 1 ) * x) :=
1223
+ begin
1224
+ have h10 : (1 : R) ≠ 0 := one_ne_zero,
1225
+ have x0 : x ≠ 0 := ne_zero_of_coeff_ne_zero (right_ne_zero_of_mul_eq_one hr),
1226
+ refine lt_of_le_of_ne ((add_val Γ R).map_le_sub (ge_of_eq (add_val Γ R).map_one) _) _,
1227
+ { simp only [add_valuation.map_mul],
1228
+ rw [add_val_apply_of_ne x0, add_val_apply_of_ne (single_ne_zero h10),
1229
+ add_val_apply_of_ne _, order_C, order_single h10, with_top.coe_zero, zero_add,
1230
+ ← with_top.coe_add, neg_add_self, with_top.coe_zero],
1231
+ { exact le_refl 0 },
1232
+ { exact C_ne_zero (left_ne_zero_of_mul_eq_one hr) } },
1233
+ { rw [add_val_apply, ← with_top.coe_zero],
1234
+ split_ifs,
1235
+ { apply with_top.coe_ne_top },
1236
+ rw [ne.def, with_top.coe_eq_coe],
1237
+ intro con,
1238
+ apply coeff_order_ne_zero h,
1239
+ rw [← con, mul_assoc, sub_coeff, one_coeff, if_pos rfl, C_mul_eq_smul, smul_coeff, smul_eq_mul,
1240
+ ← add_neg_self x.order, single_mul_coeff_add, one_mul, hr, sub_self] }
1241
+ end
1242
+
1243
+ lemma is_unit_iff {x : hahn_series Γ R} :
1244
+ is_unit x ↔ is_unit (x.coeff x.order) :=
1245
+ begin
1246
+ split,
1247
+ { rintro ⟨⟨u, i, ui, iu⟩, rfl⟩,
1248
+ refine is_unit_of_mul_eq_one (u.coeff u.order) (i.coeff i.order)
1249
+ ((mul_coeff_order_add_order (left_ne_zero_of_mul_eq_one ui)
1250
+ (right_ne_zero_of_mul_eq_one ui)).symm.trans _),
1251
+ rw [ui, one_coeff, if_pos],
1252
+ rw [← order_mul (left_ne_zero_of_mul_eq_one ui)
1253
+ (right_ne_zero_of_mul_eq_one ui), ui, order_one] },
1254
+ { rintro ⟨⟨u, i, ui, iu⟩, h⟩,
1255
+ rw [units.coe_mk] at h,
1256
+ rw h at iu,
1257
+ have h := summable_family.one_sub_self_mul_hsum_powers (unit_aux x iu),
1258
+ rw [sub_sub_cancel] at h,
1259
+ exact is_unit_of_mul_is_unit_right (is_unit_of_mul_eq_one _ _ h) },
1260
+ end
1261
+
1262
+ end integral_domain
1263
+
1264
+ instance [field R] : field (hahn_series Γ R) :=
1265
+ { inv := λ x, if x0 : x = 0 then 0 else (C (x.coeff x.order)⁻¹ * (single (-x.order)) 1 *
1266
+ (summable_family.powers _ (unit_aux x (inv_mul_cancel (coeff_order_ne_zero x0)))).hsum),
1267
+ inv_zero := dif_pos rfl,
1268
+ mul_inv_cancel := λ x x0, begin
1269
+ refine (congr rfl (dif_neg x0)).trans _,
1270
+ have h := summable_family.one_sub_self_mul_hsum_powers
1271
+ (unit_aux x (inv_mul_cancel (coeff_order_ne_zero x0))),
1272
+ rw [sub_sub_cancel] at h,
1273
+ rw [← mul_assoc, mul_comm x, h],
1274
+ end ,
1275
+ .. hahn_series.integral_domain }
1276
+
1277
+ end inversion
1278
+
1134
1279
end hahn_series
0 commit comments