@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
4
4
Authors: Eric Wieser
5
5
-/
6
6
import Mathlib.Algebra.Group.Equiv.Basic
7
- import Mathlib.Algebra.GroupWithZero.Defs
7
+ import Mathlib.Algebra.GroupWithZero.Basic
8
8
import Mathlib.Algebra.NeZero
9
9
10
10
#align_import algebra.hom.group from "leanprover-community/mathlib" @"a148d797a1094ab554ad4183a4ad6f130358ef64"
@@ -39,7 +39,7 @@ assert_not_exists DenselyOrdered
39
39
open Function
40
40
41
41
namespace NeZero
42
- variable {F α β : Type *} [Zero α] [Zero β] [FunLike F α β] [ZeroHomClass F α β] {a : α}
42
+ variable {F α β : Type *} [Zero α] [Zero β] [FunLike F α β] [ZeroHomClass F α β] {a : α}
43
43
44
44
lemma of_map (f : F) [neZero : NeZero (f a)] : NeZero a :=
45
45
⟨fun h ↦ ne (f a) <| by rw [h]; exact ZeroHomClass.map_zero f⟩
@@ -51,7 +51,7 @@ lemma of_injective {f : F} (hf : Injective f) [NeZero a] : NeZero (f a) :=
51
51
52
52
end NeZero
53
53
54
- variable {F α β γ δ : Type *} [MulZeroOneClass α] [MulZeroOneClass β] [MulZeroOneClass γ]
54
+ variable {F α β γ δ M₀ : Type *} [MulZeroOneClass α] [MulZeroOneClass β] [MulZeroOneClass γ]
55
55
[MulZeroOneClass δ]
56
56
57
57
/-- `MonoidWithZeroHomClass F α β` states that `F` is a type of
@@ -260,6 +260,22 @@ instance {β} [CommMonoidWithZero β] : Mul (α →*₀ β) where
260
260
261
261
end MonoidWithZeroHom
262
262
263
+ section CommMonoidWithZero
264
+ variable [CommMonoidWithZero M₀] {n : ℕ} (hn : n ≠ 0 )
265
+
266
+ /-- We define `x ↦ x^n` (for positive `n : ℕ`) as a `MonoidWithZeroHom` -/
267
+ def powMonoidWithZeroHom : M₀ →*₀ M₀ :=
268
+ { powMonoidHom n with map_zero' := zero_pow hn }
269
+ #align pow_monoid_with_zero_hom powMonoidWithZeroHom
270
+
271
+ @[simp] lemma coe_powMonoidWithZeroHom : (powMonoidWithZeroHom hn : M₀ → M₀) = fun x ↦ x ^ n := rfl
272
+ #align coe_pow_monoid_with_zero_hom coe_powMonoidWithZeroHom
273
+
274
+ @[simp] lemma powMonoidWithZeroHom_apply (a : M₀) : powMonoidWithZeroHom hn a = a ^ n := rfl
275
+ #align pow_monoid_with_zero_hom_apply powMonoidWithZeroHom_apply
276
+
277
+ end CommMonoidWithZero
278
+
263
279
/-! ### Equivalences -/
264
280
265
281
namespace MulEquivClass
0 commit comments