@@ -5,6 +5,7 @@ Authors: Oliver Nash
5
5
-/
6
6
import data.nat.choose.sum
7
7
import algebra.algebra.bilinear
8
+ import ring_theory.ideal.operations
8
9
9
10
/-!
10
11
# Nilpotent elements
43
44
@[simp] lemma is_nilpotent_neg_iff [ring R] : is_nilpotent (-x) ↔ is_nilpotent x :=
44
45
⟨λ h, neg_neg x ▸ h.neg, λ h, h.neg⟩
45
46
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]
47
56
(h : is_nilpotent x) : x = 0 :=
48
- by { obtain ⟨n, hn⟩ := h, exact pow_eq_zero hn, }
57
+ is_reduced.eq_zero x h
49
58
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] :
51
60
is_nilpotent x ↔ x = 0 :=
52
61
⟨λ h, h.eq_zero, λ h, h.symm ▸ is_nilpotent.zero⟩
53
62
@@ -103,6 +112,30 @@ end ring
103
112
104
113
end commute
105
114
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
+
106
139
namespace algebra
107
140
108
141
variables (R) {A : Type v} [comm_semiring R] [semiring A] [algebra R A]
0 commit comments