Skip to content

Commit

Permalink
feat(RingTheory/Nilpotent): add lemma on powers of nilpotents (#7340)
Browse files Browse the repository at this point in the history
add lemma saying that powers of nilpotent elements are nilpotent.
  • Loading branch information
rmhi committed Sep 25, 2023
1 parent b915222 commit 8f4cf33
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Mathlib/RingTheory/Nilpotent.lean
Expand Up @@ -55,6 +55,18 @@ theorem IsNilpotent.neg [Ring R] (h : IsNilpotent x) : IsNilpotent (-x) := by
rw [neg_pow, hn, mul_zero]
#align is_nilpotent.neg IsNilpotent.neg

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

lemma IsNilpotent.pow_of_pos {n} {S : Type*} [MonoidWithZero S] {x : S}
(hx : IsNilpotent x) (hn : n ≠ 0) : IsNilpotent (x ^ n) := by
cases n with
| zero => contradiction
| succ => exact IsNilpotent.pow hx

@[simp]
theorem isNilpotent_neg_iff [Ring R] : IsNilpotent (-x) ↔ IsNilpotent x :=
fun h => neg_neg x ▸ h.neg, fun h => h.neg⟩
Expand Down

0 comments on commit 8f4cf33

Please sign in to comment.