@@ -100,11 +100,10 @@ class is_monoid_hom [mul_one_class α] [mul_one_class β] (f : α → β) extend
100
100
namespace monoid_hom
101
101
102
102
/-!
103
- Throughout this section, some `monoid ` arguments are specified with `{}` instead of `[]`.
103
+ Throughout this section, some `mul_one_class ` arguments are specified with `{}` instead of `[]`.
104
104
See note [implicit instance arguments].
105
105
-/
106
- variables {M : Type *} {N : Type *} {P : Type *} [mM : monoid M] [mN : monoid N] {mP : monoid P}
107
- variables {G : Type *} {H : Type *} [group G] [comm_group H]
106
+ variables {M : Type *} {N : Type *} [mM : mul_one_class M] [mN : mul_one_class N]
108
107
109
108
include mM mN
110
109
/-- Interpret a map `f : M → N` as a homomorphism `M →* N`. -/
@@ -114,7 +113,7 @@ def of (f : M → N) [h : is_monoid_hom f] : M →* N :=
114
113
map_one' := h.2 ,
115
114
map_mul' := h.1 .1 }
116
115
117
- variables {mM mN mP }
116
+ variables {mM mN}
118
117
@[simp, to_additive]
119
118
lemma coe_of (f : M → N) [is_monoid_hom f] : ⇑ (monoid_hom.of f) = f :=
120
119
rfl
@@ -128,22 +127,21 @@ end monoid_hom
128
127
129
128
namespace mul_equiv
130
129
131
- variables {M : Type *} {N : Type *} [monoid M] [monoid N]
130
+ variables {M : Type *} {N : Type *} [mul_one_class M] [mul_one_class N]
132
131
133
132
/-- A multiplicative isomorphism preserves multiplication (deprecated). -/
134
133
@[to_additive]
135
134
instance (h : M ≃* N) : is_mul_hom h := ⟨h.map_mul⟩
136
135
137
136
/-- A multiplicative bijection between two monoids is a monoid hom
138
- (deprecated -- use to_monoid_hom). -/
137
+ (deprecated -- use `mul_equiv. to_monoid_hom` ). -/
139
138
@[to_additive]
140
- instance {M N} [monoid M] [monoid N] (h : M ≃* N) : is_monoid_hom h :=
141
- ⟨h.map_one⟩
139
+ instance (h : M ≃* N) : is_monoid_hom h := ⟨h.map_one⟩
142
140
143
141
end mul_equiv
144
142
145
143
namespace is_monoid_hom
146
- variables [monoid α] [monoid β] (f : α → β) [is_monoid_hom f]
144
+ variables [mul_one_class α] [mul_one_class β] (f : α → β) [is_monoid_hom f]
147
145
148
146
/-- A monoid homomorphism preserves multiplication. -/
149
147
@[to_additive]
@@ -154,20 +152,20 @@ end is_monoid_hom
154
152
155
153
/-- A map to a group preserving multiplication is a monoid homomorphism. -/
156
154
@[to_additive]
157
- theorem is_monoid_hom.of_mul [monoid α] [group β] (f : α → β) [is_mul_hom f] :
155
+ theorem is_monoid_hom.of_mul [mul_one_class α] [group β] (f : α → β) [is_mul_hom f] :
158
156
is_monoid_hom f :=
159
157
{ map_one := mul_right_eq_self.1 $ by rw [← is_mul_hom.map_mul f, one_mul] }
160
158
161
159
namespace is_monoid_hom
162
- variables [monoid α] [monoid β] (f : α → β) [is_monoid_hom f]
160
+ variables [mul_one_class α] [mul_one_class β] (f : α → β) [is_monoid_hom f]
163
161
164
162
/-- The identity map is a monoid homomorphism. -/
165
163
@[to_additive]
166
164
instance id : is_monoid_hom (@id α) := { map_one := rfl }
167
165
168
166
/-- The composite of two monoid homomorphisms is a monoid homomorphism. -/
169
167
@[to_additive] -- see Note [no instance on morphisms]
170
- lemma comp {γ} [monoid γ] (g : β → γ) [is_monoid_hom g] :
168
+ lemma comp {γ} [mul_one_class γ] (g : β → γ) [is_monoid_hom g] :
171
169
is_monoid_hom (g ∘ f) :=
172
170
{ map_one := show g _ = 1 , by rw [map_one f, map_one g], ..is_mul_hom.comp _ _ }
173
171
@@ -350,12 +348,13 @@ lemma multiplicative.is_mul_hom [has_add α] [has_add β] (f : α → β) [is_ad
350
348
@is_mul_hom (multiplicative α) (multiplicative β) _ _ f :=
351
349
{ map_mul := @is_add_hom.map_add α β _ _ f _ }
352
350
353
- lemma additive.is_add_monoid_hom [monoid α] [monoid β] (f : α → β) [is_monoid_hom f] :
351
+ lemma additive.is_add_monoid_hom [mul_one_class α] [mul_one_class β] (f : α → β) [is_monoid_hom f] :
354
352
@is_add_monoid_hom (additive α) (additive β) _ _ f :=
355
353
{ map_zero := @is_monoid_hom.map_one α β _ _ f _,
356
354
..additive.is_add_hom f }
357
355
358
- lemma multiplicative.is_monoid_hom [add_monoid α] [add_monoid β] (f : α → β) [is_add_monoid_hom f] :
356
+ lemma multiplicative.is_monoid_hom
357
+ [add_zero_class α] [add_zero_class β] (f : α → β) [is_add_monoid_hom f] :
359
358
@is_monoid_hom (multiplicative α) (multiplicative β) _ _ f :=
360
359
{ map_one := @is_add_monoid_hom.map_zero α β _ _ f _,
361
360
..multiplicative.is_mul_hom f }
0 commit comments