@@ -26,21 +26,18 @@ instance subset.ring {S : set R} [is_subring S] : ring S :=
26
26
27
27
instance subtype.ring {S : set R} [is_subring S] : ring (subtype S) := subset.ring
28
28
29
- namespace is_ring_hom
30
-
31
- instance {S : set R} [is_subring S] : is_ring_hom (@subtype.val R S) :=
32
- by refine {..} ; intros ; refl
29
+ namespace ring_hom
33
30
34
31
instance is_subring_preimage {R : Type u} {S : Type v} [ring R] [ring S]
35
- (f : R → S) [is_ring_hom f] (s : set S) [is_subring s] : is_subring (f ⁻¹' s) := {}
32
+ (f : R →+* S) (s : set S) [is_subring s] : is_subring (f ⁻¹' s) := {}
36
33
37
34
instance is_subring_image {R : Type u} {S : Type v} [ring R] [ring S]
38
- (f : R → S) [is_ring_hom f] (s : set R) [is_subring s] : is_subring (f '' s) := {}
35
+ (f : R →+* S) (s : set R) [is_subring s] : is_subring (f '' s) := {}
39
36
40
37
instance is_subring_set_range {R : Type u} {S : Type v} [ring R] [ring S]
41
- (f : R → S) [is_ring_hom f] : is_subring (set.range f) := {}
38
+ (f : R →+* S) : is_subring (set.range f) := {}
42
39
43
- end is_ring_hom
40
+ end ring_hom
44
41
45
42
/-- Restrict the codomain of a ring homomorphism to a subring that includes the range. -/
46
43
def ring_hom.cod_restrict {R : Type u} {S : Type v} [ring R] [ring S] (f : R →+* S)
@@ -52,20 +49,12 @@ def ring_hom.cod_restrict {R : Type u} {S : Type v} [ring R] [ring S] (f : R →
52
49
map_mul' := λ x y, subtype.eq $ f.map_mul x y,
53
50
map_one' := subtype.eq f.map_one }
54
51
55
- instance subtype_val.is_ring_hom {s : set R} [is_subring s] :
56
- is_ring_hom (subtype.val : s → R) :=
57
- { ..subtype_val.is_add_group_hom, ..subtype_val.is_monoid_hom }
58
-
59
- instance coe.is_ring_hom {s : set R} [is_subring s] : is_ring_hom (coe : s → R) :=
60
- subtype_val.is_ring_hom
61
-
62
- instance subtype_mk.is_ring_hom {γ : Type *} [ring γ] {s : set R} [is_subring s] (f : γ → R)
63
- [is_ring_hom f] (h : ∀ x, f x ∈ s) : is_ring_hom (λ x, (⟨f x, h x⟩ : s)) :=
64
- { ..subtype_mk.is_add_group_hom f h, ..subtype_mk.is_monoid_hom f h }
52
+ /-- Coersion `S → R` as a ring homormorphism-/
53
+ def is_subring.subtype (S : set R) [is_subring S] : S →+* R :=
54
+ ⟨coe, rfl, λ _ _, rfl, rfl, λ _ _, rfl⟩
65
55
66
- instance set_inclusion.is_ring_hom {s t : set R} [is_subring s] [is_subring t] (h : s ⊆ t) :
67
- is_ring_hom (set.inclusion h) :=
68
- subtype_mk.is_ring_hom _ _
56
+ @[simp] lemma is_subring.coe_subtype {S : set R} [is_subring S] :
57
+ ⇑(is_subring.subtype S) = coe := rfl
69
58
70
59
variables {cR : Type u} [comm_ring cR]
71
60
@@ -190,18 +179,18 @@ theorem closure_subset_iff (s t : set R) [is_subring t] : closure s ⊆ t ↔ s
190
179
theorem closure_mono {s t : set R} (H : s ⊆ t) : closure s ⊆ closure t :=
191
180
closure_subset $ set.subset.trans H subset_closure
192
181
193
- lemma image_closure {S : Type *} [ring S] (f : R → S) [is_ring_hom f] (s : set R) :
182
+ lemma image_closure {S : Type *} [ring S] (f : R →+* S) (s : set R) :
194
183
f '' closure s = closure (f '' s) :=
195
184
le_antisymm
196
185
begin
197
186
rintros _ ⟨x, hx, rfl⟩,
198
187
apply in_closure.rec_on hx; intros,
199
- { rw [is_monoid_hom .map_one f ], apply is_submonoid.one_mem },
200
- { rw [is_ring_hom .map_neg f , is_monoid_hom.map_one f],
188
+ { rw [f .map_one], apply is_submonoid.one_mem },
189
+ { rw [f .map_neg, is_monoid_hom.map_one f],
201
190
apply is_add_subgroup.neg_mem, apply is_submonoid.one_mem },
202
- { rw [is_monoid_hom .map_mul f ],
191
+ { rw [f .map_mul],
203
192
apply is_submonoid.mul_mem; solve_by_elim [subset_closure, set.mem_image_of_mem] },
204
- { rw [is_ring_hom .map_add f ], apply is_add_submonoid.add_mem, assumption' },
193
+ { rw [f .map_add], apply is_add_submonoid.add_mem, assumption' },
205
194
end
206
195
(closure_subset $ set.image_subset _ subset_closure)
207
196
0 commit comments