Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 158263c

Browse files
committed
feat(ring_theory): Nilradical and reduced ring (#10576)
Co-authored-by: Andrew Yang <36414270+erdOne@users.noreply.github.com>
1 parent c176aa5 commit 158263c

File tree

1 file changed

+36
-3
lines changed

1 file changed

+36
-3
lines changed

src/ring_theory/nilpotent.lean

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Authors: Oliver Nash
55
-/
66
import data.nat.choose.sum
77
import algebra.algebra.bilinear
8+
import ring_theory.ideal.operations
89

910
/-!
1011
# Nilpotent elements
@@ -43,11 +44,19 @@ end
4344
@[simp] lemma is_nilpotent_neg_iff [ring R] : is_nilpotent (-x) ↔ is_nilpotent x :=
4445
⟨λ h, neg_neg x ▸ h.neg, λ h, h.neg⟩
4546

46-
lemma is_nilpotent.eq_zero [monoid_with_zero R] [no_zero_divisors R]
47+
/-- A structure that has zero and pow is reduced if it has no nonzero nilpotent elements. -/
48+
class is_reduced (R : Type*) [has_zero R] [has_pow R ℕ] : Prop :=
49+
(eq_zero : ∀ (x : R), is_nilpotent x → x = 0)
50+
51+
@[priority 900]
52+
instance is_reduced_of_no_zero_divisors [monoid_with_zero R] [no_zero_divisors R] : is_reduced R :=
53+
⟨λ _ ⟨_, hn⟩, pow_eq_zero hn⟩
54+
55+
lemma is_nilpotent.eq_zero [has_zero R] [has_pow R ℕ] [is_reduced R]
4756
(h : is_nilpotent x) : x = 0 :=
48-
by { obtain ⟨n, hn⟩ := h, exact pow_eq_zero hn, }
57+
is_reduced.eq_zero x h
4958

50-
@[simp] lemma is_nilpotent_iff_eq_zero [monoid_with_zero R] [no_zero_divisors R] :
59+
@[simp] lemma is_nilpotent_iff_eq_zero [monoid_with_zero R] [is_reduced R] :
5160
is_nilpotent x ↔ x = 0 :=
5261
⟨λ h, h.eq_zero, λ h, h.symm ▸ is_nilpotent.zero⟩
5362

@@ -103,6 +112,30 @@ end ring
103112

104113
end commute
105114

115+
section comm_semiring
116+
117+
variable [comm_semiring R]
118+
119+
/-- The nilradical of a commutative semiring is the ideal of nilpotent elements. -/
120+
def nilradical (R : Type*) [comm_semiring R] : ideal R := (0 : ideal R).radical
121+
122+
lemma mem_nilradical : x ∈ nilradical R ↔ is_nilpotent x := iff.rfl
123+
124+
lemma nilradical_eq_Inf (R : Type*) [comm_semiring R] :
125+
nilradical R = Inf { J : ideal R | J.is_prime } :=
126+
by { convert ideal.radical_eq_Inf 0, simp }
127+
128+
lemma nilpotent_iff_mem_prime : is_nilpotent x ↔ ∀ (J : ideal R), J.is_prime → x ∈ J :=
129+
by { rw [← mem_nilradical, nilradical_eq_Inf, submodule.mem_Inf], refl }
130+
131+
lemma nilradical_le_prime (J : ideal R) [H : J.is_prime] : nilradical R ≤ J :=
132+
(nilradical_eq_Inf R).symm ▸ Inf_le H
133+
134+
@[simp] lemma nilradical_eq_zero (R : Type*) [comm_semiring R] [is_reduced R] : nilradical R = 0 :=
135+
ideal.ext $ λ _, is_nilpotent_iff_eq_zero
136+
137+
end comm_semiring
138+
106139
namespace algebra
107140

108141
variables (R) {A : Type v} [comm_semiring R] [semiring A] [algebra R A]

0 commit comments

Comments
 (0)