Skip to content

Commit 796fc3f

Browse files
feat : add lemma on nilpotent and powers (#8831)
Changed `IsNilpotent.pow to IsNilpotent.pow_succ`. Added `IsNilpotent.of_pow` and `IsNilpotent.pow_iff_pos`. Co-authored-by: Xavier Xarles <56635243+XavierXarles@users.noreply.github.com> Co-authored-by: Riccardo Brasca <riccardo.brasca@gmail.com>
1 parent 11980d2 commit 796fc3f

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

Mathlib/RingTheory/Nilpotent.lean

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,28 @@ theorem IsNilpotent.neg [Ring R] (h : IsNilpotent x) : IsNilpotent (-x) := by
5858
rw [neg_pow, hn, mul_zero]
5959
#align is_nilpotent.neg IsNilpotent.neg
6060

61-
lemma IsNilpotent.pow {n : ℕ} {S : Type*} [MonoidWithZero S] {x : S}
61+
lemma IsNilpotent.pow_succ (n : ℕ) {S : Type*} [MonoidWithZero S] {x : S}
6262
(hx : IsNilpotent x) : IsNilpotent (x ^ n.succ) := by
6363
obtain ⟨N,hN⟩ := hx
6464
use N
6565
rw [← pow_mul, Nat.succ_mul, pow_add, hN, mul_zero]
6666

67+
theorem IsNilpotent.of_pow [MonoidWithZero R] {x : R} {m : ℕ}
68+
(h : IsNilpotent (x ^ m)) : IsNilpotent x := by
69+
obtain ⟨n, h⟩ := h
70+
use (m*n)
71+
rw [← h, pow_mul x m n]
72+
6773
lemma IsNilpotent.pow_of_pos {n} {S : Type*} [MonoidWithZero S] {x : S}
6874
(hx : IsNilpotent x) (hn : n ≠ 0) : IsNilpotent (x ^ n) := by
6975
cases n with
7076
| zero => contradiction
71-
| succ => exact IsNilpotent.pow hx
77+
| succ => exact IsNilpotent.pow_succ _ hx
78+
79+
@[simp]
80+
lemma IsNilpotent.pow_iff_pos {n} {S : Type*} [MonoidWithZero S] {x : S}
81+
(hn : n ≠ 0) : IsNilpotent (x ^ n) ↔ IsNilpotent x :=
82+
fun h => of_pow h, fun h => pow_of_pos h hn⟩
7283

7384
@[simp]
7485
theorem isNilpotent_neg_iff [Ring R] : IsNilpotent (-x) ↔ IsNilpotent x :=

0 commit comments

Comments
 (0)