@@ -95,30 +95,27 @@ homomorphism `pi.non_unital_ring_hom f : γ →+* Π a, β a` given by
9595protected def non_unital_ring_hom {γ : Type w} [Π i, non_unital_non_assoc_semiring (f i)]
9696 [non_unital_non_assoc_semiring γ] (g : Π i, γ →ₙ+* f i) : γ →ₙ+* Π i, f i :=
9797{ to_fun := λ x b, g b x,
98- map_add' := λ x y, funext $ λ z, map_add (g z) x y,
99- map_mul' := λ x y, funext $ λ z, map_mul (g z) x y,
100- map_zero' := funext $ λ z, map_zero (g z) }
98+ .. pi.mul_hom (λ i, (g i).to_mul_hom),
99+ .. pi.add_monoid_hom (λ i, (g i).to_add_monoid_hom) }
101100
102101lemma non_unital_ring_hom_injective {γ : Type w} [nonempty I]
103102 [Π i, non_unital_non_assoc_semiring (f i)] [non_unital_non_assoc_semiring γ] (g : Π i, γ →ₙ+* f i)
104103 (hg : ∀ i, function.injective (g i)) : function.injective (pi.non_unital_ring_hom g) :=
105- λ x y h, let ⟨i⟩ := ‹nonempty I› in hg i ((function.funext_iff.mp h : _) i)
104+ mul_hom_injective (λ i, (g i).to_mul_hom) hg
106105
107106/-- A family of ring homomorphisms `f a : γ →+* β a` defines a ring homomorphism
108107`pi.ring_hom f : γ →+* Π a, β a` given by `pi.ring_hom f x b = f b x`. -/
109108@[simps]
110109protected def ring_hom {γ : Type w} [Π i, non_assoc_semiring (f i)] [non_assoc_semiring γ]
111110 (g : Π i, γ →+* f i) : γ →+* Π i, f i :=
112111{ to_fun := λ x b, g b x,
113- map_add' := λ x y, funext $ λ z, (g z).map_add x y,
114- map_mul' := λ x y, funext $ λ z, (g z).map_mul x y,
115- map_one' := funext $ λ z, (g z).map_one,
116- map_zero' := funext $ λ z, (g z).map_zero }
112+ .. pi.monoid_hom (λ i, (g i).to_monoid_hom),
113+ .. pi.add_monoid_hom (λ i, (g i).to_add_monoid_hom) }
117114
118115lemma ring_hom_injective {γ : Type w} [nonempty I] [Π i, non_assoc_semiring (f i)]
119116 [non_assoc_semiring γ] (g : Π i, γ →+* f i) (hg : ∀ i, function.injective (g i)) :
120117 function.injective (pi.ring_hom g) :=
121- λ x y h, let ⟨i⟩ := ‹nonempty I› in hg i ((function.funext_iff.mp h : _) i)
118+ monoid_hom_injective (λ i, (g i).to_monoid_hom) hg
122119
123120end pi
124121
0 commit comments