@@ -3,54 +3,15 @@ Copyright (c) 2019 Amelia Livingston. All rights reserved.
33Released under Apache 2.0 license as described in the file LICENSE.
44Authors: Amelia Livingston, Jireh Loreaux
55-/
6- import Mathlib.Algebra.Divisibility.Hom
7- import Mathlib.Algebra.GroupWithZero.InjSurj
6+
87import Mathlib.Algebra.Ring.Hom.Defs
9- import Mathlib.Data.Set.Insert
108
119/-!
1210# Additional lemmas about homomorphisms of semirings and rings
13-
14- These lemmas have been banished here to avoid unnecessary imports in
15- `Mathlib/Algebra/Hom/Ring/Defs.lean`.
16-
17- They could be moved to more natural homes.
1811-/
1912
2013assert_not_exists RelIso Field
2114
22- open Function
23-
24- variable {α β : Type *}
25-
2615namespace RingHom
2716
28- section
29-
30- variable {_ : NonAssocSemiring α} {_ : NonAssocSemiring β} (f : α →+* β)
31-
32- /-- `f : α →+* β` has a trivial codomain iff its range is `{0}`. -/
33- theorem codomain_trivial_iff_range_eq_singleton_zero : (0 : β) = 1 ↔ Set.range f = {0 } :=
34- f.codomain_trivial_iff_range_trivial.trans
35- ⟨fun h =>
36- Set.ext fun y => ⟨fun ⟨x, hx⟩ => by simp [← hx, h x], fun hy => ⟨0 , by simpa using hy.symm⟩⟩,
37- fun h x => Set.mem_singleton_iff.mp (h ▸ Set.mem_range_self x)⟩
38-
39- end
40-
41- section Semiring
42-
43- variable [Semiring α] [Semiring β]
44-
45- protected theorem map_dvd (f : α →+* β) {a b : α} : a ∣ b → f a ∣ f b :=
46- map_dvd f
47-
48- end Semiring
49-
5017end RingHom
51-
52- /-- Pullback `IsDomain` instance along an injective function. -/
53- protected theorem Function.Injective.isDomain [Semiring α] [IsDomain α] [Semiring β] {F}
54- [FunLike F β α] [MonoidWithZeroHomClass F β α] (f : F) (hf : Injective f) : IsDomain β where
55- __ := domain_nontrivial f (map_zero _) (map_one _)
56- __ := hf.isCancelMulZero f (map_zero _) (map_mul _)
0 commit comments