@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
4
4
Authors: Neil Strickland, Yury Kudryashov
5
5
-/
6
6
import Mathlib.Algebra.Group.Semiconj.Defs
7
+ import Mathlib.Data.Nat.Defs
7
8
8
9
#align_import algebra.group.commute from "leanprover-community/mathlib" @"05101c3df9d9cfe9430edc205860c79b6d660102"
9
10
@@ -209,12 +210,6 @@ theorem pow_pow_self (a : M) (m n : ℕ) : Commute (a ^ m) (a ^ n) :=
209
210
#align add_commute.nsmul_nsmul_self AddCommute.nsmul_nsmul_selfₓ
210
211
-- `MulOneClass.toHasMul` vs. `MulOneClass.toMul`
211
212
212
- @[to_additive succ_nsmul']
213
- theorem _root_.pow_succ' (a : M) (n : ℕ) : a ^ (n + 1 ) = a ^ n * a :=
214
- (pow_succ a n).trans (self_pow _ _)
215
- #align pow_succ' pow_succ'
216
- #align succ_nsmul' succ_nsmul'
217
-
218
213
end Monoid
219
214
220
215
section DivisionMonoid
@@ -253,6 +248,25 @@ end Group
253
248
254
249
end Commute
255
250
251
+ section Monoid
252
+ variable {M : Type *} [Monoid M] {n : ℕ}
253
+
254
+ @[to_additive succ_nsmul']
255
+ lemma pow_succ' (a : M) (n : ℕ) : a ^ (n + 1 ) = a ^ n * a :=
256
+ (pow_succ a n).trans (Commute.self_pow _ _)
257
+ #align pow_succ' pow_succ'
258
+ #align succ_nsmul' succ_nsmul'
259
+
260
+ @[to_additive]
261
+ lemma mul_pow_sub_one (hn : n ≠ 0 ) (a : M) : a * a ^ (n - 1 ) = a ^ n := by
262
+ rw [← pow_succ, Nat.sub_add_cancel $ Nat.one_le_iff_ne_zero.2 hn]
263
+
264
+ @[to_additive]
265
+ lemma pow_sub_one_mul (hn : n ≠ 0 ) (a : M) : a ^ (n - 1 ) * a = a ^ n := by
266
+ rw [← pow_succ', Nat.sub_add_cancel $ Nat.one_le_iff_ne_zero.2 hn]
267
+
268
+ end Monoid
269
+
256
270
section CommGroup
257
271
258
272
variable [CommGroup G] (a b : G)
0 commit comments