@@ -180,3 +180,44 @@ if b0 : b = 0 then by simp [b0] else
180
180
field.div_div_cancel ha b0
181
181
182
182
end
183
+
184
+ @[reducible] def is_field_hom {α β} [division_ring α] [division_ring β] (f : α → β) := is_ring_hom f
185
+
186
+ namespace is_field_hom
187
+ open is_ring_hom
188
+
189
+ section
190
+ variables {β : Type *} [division_ring α] [division_ring β]
191
+ variables (f : α → β) [is_field_hom f] {x y : α}
192
+
193
+ lemma map_ne_zero : f x ≠ 0 ↔ x ≠ 0 :=
194
+ ⟨mt $ λ h, h.symm ▸ map_zero f,
195
+ λ x0 h, one_ne_zero $ calc
196
+ 1 = f (x * x⁻¹) : by rw [mul_inv_cancel x0, map_one f]
197
+ ... = 0 : by rw [map_mul f, h, zero_mul]⟩
198
+
199
+ lemma map_eq_zero : f x = 0 ↔ x = 0 :=
200
+ by haveI := classical.dec; exact not_iff_not.1 (map_ne_zero f)
201
+
202
+ lemma map_inv' (h : x ≠ 0 ) : f x⁻¹ = (f x)⁻¹ :=
203
+ (domain.mul_left_inj ((map_ne_zero f).2 h)).1 $
204
+ by rw [mul_inv_cancel ((map_ne_zero f).2 h), ← map_mul f, mul_inv_cancel h, map_one f]
205
+
206
+ lemma map_div' (h : y ≠ 0 ) : f (x / y) = f x / f y :=
207
+ by simp [division_def, map_mul f, map_inv' f h]
208
+
209
+ end
210
+
211
+ section
212
+ variables {β : Type *} [discrete_field α] [discrete_field β]
213
+ variables (f : α → β) [is_field_hom f] {x y : α}
214
+
215
+ lemma map_inv : f x⁻¹ = (f x)⁻¹ :=
216
+ classical.by_cases (by rintro rfl; simp [map_zero f]) (map_inv' f)
217
+
218
+ lemma map_div : f (x / y) = f x / f y :=
219
+ by simp [division_def, map_mul f, map_inv f]
220
+
221
+ end
222
+
223
+ end is_field_hom
0 commit comments