@@ -8,6 +8,7 @@ import Mathlib.RingTheory.GradedAlgebra.Basic
8
8
import Mathlib.RingTheory.Ideal.Basic
9
9
import Mathlib.RingTheory.Ideal.BigOperators
10
10
import Mathlib.RingTheory.Ideal.Maps
11
+ import Mathlib.RingTheory.GradedAlgebra.Homogeneous.Submodule
11
12
12
13
/-!
13
14
# Homogeneous ideals of a graded algebra
@@ -56,49 +57,39 @@ variable (I : Ideal A)
56
57
57
58
/-- An `I : Ideal A` is homogeneous if for every `r ∈ I`, all homogeneous components
58
59
of `r` are in `I`. -/
59
- def Ideal.IsHomogeneous : Prop :=
60
- ∀ (i : ι) ⦃r : A⦄, r ∈ I → (DirectSum.decompose 𝒜 r i : A) ∈ I
60
+ abbrev Ideal.IsHomogeneous : Prop := Submodule.IsHomogeneous I 𝒜
61
61
62
62
theorem Ideal.IsHomogeneous.mem_iff {I} (hI : Ideal.IsHomogeneous 𝒜 I) {x} :
63
- x ∈ I ↔ ∀ i, (decompose 𝒜 x i : A) ∈ I := by
64
- classical
65
- refine ⟨fun hx i ↦ hI i hx, fun hx ↦ ?_⟩
66
- rw [← DirectSum.sum_support_decompose 𝒜 x]
67
- exact Ideal.sum_mem _ (fun i _ ↦ hx i)
63
+ x ∈ I ↔ ∀ i, (decompose 𝒜 x i : A) ∈ I :=
64
+ AddSubmonoidClass.IsHomogeneous.mem_iff 𝒜 _ hI
68
65
69
66
/-- For any `Semiring A`, we collect the homogeneous ideals of `A` into a type. -/
70
- structure HomogeneousIdeal extends Submodule A A where
71
- is_homogeneous' : Ideal.IsHomogeneous 𝒜 toSubmodule
67
+ abbrev HomogeneousIdeal := HomogeneousSubmodule 𝒜 𝒜
72
68
73
69
variable {𝒜}
74
70
75
71
/-- Converting a homogeneous ideal to an ideal. -/
76
- def HomogeneousIdeal.toIdeal (I : HomogeneousIdeal 𝒜) : Ideal A :=
72
+ abbrev HomogeneousIdeal.toIdeal (I : HomogeneousIdeal 𝒜) : Ideal A :=
77
73
I.toSubmodule
78
74
79
- theorem HomogeneousIdeal.isHomogeneous (I : HomogeneousIdeal 𝒜) : I.toIdeal.IsHomogeneous 𝒜 :=
80
- I.is_homogeneous'
75
+ theorem HomogeneousIdeal.isHomogeneous (I : HomogeneousIdeal 𝒜) :
76
+ I.toIdeal.IsHomogeneous 𝒜 := I.is_homogeneous'
81
77
82
78
theorem HomogeneousIdeal.toIdeal_injective :
83
79
Function.Injective (HomogeneousIdeal.toIdeal : HomogeneousIdeal 𝒜 → Ideal A) :=
84
- fun ⟨x, hx⟩ ⟨y, hy⟩ => fun (h : x = y) => by simp [h]
80
+ HomogeneousSubmodule.toSubmodule_injective 𝒜 𝒜
85
81
86
- instance HomogeneousIdeal.setLike : SetLike (HomogeneousIdeal 𝒜) A where
87
- coe I := I.toIdeal
88
- coe_injective' _ _ h := HomogeneousIdeal.toIdeal_injective <| SetLike.coe_injective h
82
+ instance HomogeneousIdeal.setLike : SetLike (HomogeneousIdeal 𝒜) A :=
83
+ HomogeneousSubmodule.setLike 𝒜 𝒜
89
84
90
85
@[ext]
91
86
theorem HomogeneousIdeal.ext {I J : HomogeneousIdeal 𝒜} (h : I.toIdeal = J.toIdeal) : I = J :=
92
87
HomogeneousIdeal.toIdeal_injective h
93
88
94
89
theorem HomogeneousIdeal.ext' {I J : HomogeneousIdeal 𝒜} (h : ∀ i, ∀ x ∈ 𝒜 i, x ∈ I ↔ x ∈ J) :
95
- I = J := by
96
- ext
97
- rw [I.isHomogeneous.mem_iff, J.isHomogeneous.mem_iff]
98
- apply forall_congr'
99
- exact fun i ↦ h i _ (decompose 𝒜 _ i).2
90
+ I = J := HomogeneousSubmodule.ext' 𝒜 𝒜 h
100
91
101
- @[simp]
92
+ @[simp high ]
102
93
theorem HomogeneousIdeal.mem_iff {I : HomogeneousIdeal 𝒜} {x : A} : x ∈ I.toIdeal ↔ x ∈ I :=
103
94
Iff.rfl
104
95
@@ -113,7 +104,7 @@ variable (I : Ideal A)
113
104
/-- For any `I : Ideal A`, not necessarily homogeneous, `I.homogeneousCore' 𝒜`
114
105
is the largest homogeneous ideal of `A` contained in `I`, as an ideal. -/
115
106
def Ideal.homogeneousCore' (I : Ideal A) : Ideal A :=
116
- Ideal.span ((↑) '' (((↑) : Subtype (Homogeneous 𝒜) → A) ⁻¹' I))
107
+ Ideal.span ((↑) '' (((↑) : Subtype (SetLike.IsHomogeneousElem 𝒜) → A) ⁻¹' I))
117
108
118
109
theorem Ideal.homogeneousCore'_mono : Monotone (Ideal.homogeneousCore' 𝒜) :=
119
110
fun _ _ I_le_J => Ideal.span_mono <| Set.image_subset _ fun _ => @I_le_J _
@@ -138,7 +129,8 @@ theorem Ideal.isHomogeneous_iff_subset_iInter :
138
129
I.IsHomogeneous 𝒜 ↔ (I : Set A) ⊆ ⋂ i, GradedRing.proj 𝒜 i ⁻¹' ↑I :=
139
130
subset_iInter_iff.symm
140
131
141
- theorem Ideal.mul_homogeneous_element_mem_of_mem {I : Ideal A} (r x : A) (hx₁ : Homogeneous 𝒜 x)
132
+ theorem Ideal.mul_homogeneous_element_mem_of_mem
133
+ {I : Ideal A} (r x : A) (hx₁ : SetLike.IsHomogeneousElem 𝒜 x)
142
134
(hx₂ : x ∈ I) (j : ι) : GradedRing.proj 𝒜 j (r * x) ∈ I := by
143
135
classical
144
136
rw [← DirectSum.sum_support_decompose 𝒜 r, Finset.sum_mul, map_sum]
@@ -152,7 +144,7 @@ theorem Ideal.mul_homogeneous_element_mem_of_mem {I : Ideal A} (r x : A) (hx₁
152
144
· exact I.mul_mem_left _ hx₂
153
145
· exact I.zero_mem
154
146
155
- theorem Ideal.homogeneous_span (s : Set A) (h : ∀ x ∈ s, Homogeneous 𝒜 x) :
147
+ theorem Ideal.homogeneous_span (s : Set A) (h : ∀ x ∈ s, SetLike.IsHomogeneousElem 𝒜 x) :
156
148
(Ideal.span s).IsHomogeneous 𝒜 := by
157
149
rintro i r hr
158
150
rw [Ideal.span, Finsupp.span_eq_range_linearCombination] at hr
@@ -173,7 +165,7 @@ is the largest homogeneous ideal of `A` contained in `I`. -/
173
165
def Ideal.homogeneousCore : HomogeneousIdeal 𝒜 :=
174
166
⟨Ideal.homogeneousCore' 𝒜 I,
175
167
Ideal.homogeneous_span _ _ fun _ h => by
176
- have := Subtype.image_preimage_coe (setOf (Homogeneous 𝒜)) (I : Set A)
168
+ have := Subtype.image_preimage_coe (setOf (SetLike.IsHomogeneousElem 𝒜)) (I : Set A)
177
169
exact (cast congr(_ ∈ $this) h).1 ⟩
178
170
179
171
theorem Ideal.homogeneousCore_mono : Monotone (Ideal.homogeneousCore 𝒜) :=
@@ -184,7 +176,7 @@ theorem Ideal.toIdeal_homogeneousCore_le : (I.homogeneousCore 𝒜).toIdeal ≤
184
176
185
177
variable {𝒜 I}
186
178
187
- theorem Ideal.mem_homogeneousCore_of_homogeneous_of_mem {x : A} (h : SetLike.Homogeneous 𝒜 x)
179
+ theorem Ideal.mem_homogeneousCore_of_homogeneous_of_mem {x : A} (h : SetLike.IsHomogeneousElem 𝒜 x)
188
180
(hmem : x ∈ I) : x ∈ I.homogeneousCore 𝒜 :=
189
181
Ideal.subset_span ⟨⟨x, h⟩, hmem, rfl⟩
190
182
@@ -194,7 +186,7 @@ theorem Ideal.IsHomogeneous.toIdeal_homogeneousCore_eq_self (h : I.IsHomogeneous
194
186
intro x hx
195
187
classical
196
188
rw [← DirectSum.sum_support_decompose 𝒜 x]
197
- exact Ideal.sum_mem _ fun j _ => Ideal.subset_span ⟨⟨_, homogeneous_coe _⟩, h _ hx, rfl⟩
189
+ exact Ideal.sum_mem _ fun j _ => Ideal.subset_span ⟨⟨_, isHomogeneousElem_coe _⟩, h _ hx, rfl⟩
198
190
199
191
@[simp]
200
192
theorem HomogeneousIdeal.toIdeal_homogeneousCore_eq_self (I : HomogeneousIdeal 𝒜) :
@@ -481,7 +473,7 @@ def Ideal.homogeneousHull : HomogeneousIdeal 𝒜 :=
481
473
⟨Ideal.span { r : A | ∃ (i : ι) (x : I), (DirectSum.decompose 𝒜 (x : A) i : A) = r }, by
482
474
refine Ideal.homogeneous_span _ _ fun x hx => ?_
483
475
obtain ⟨i, x, rfl⟩ := hx
484
- apply SetLike.homogeneous_coe ⟩
476
+ apply SetLike.isHomogeneousElem_coe ⟩
485
477
486
478
theorem Ideal.le_toIdeal_homogeneousHull : I ≤ (Ideal.homogeneousHull 𝒜 I).toIdeal := by
487
479
intro r hr
@@ -526,10 +518,9 @@ theorem Ideal.homogeneousHull_eq_iSup :
526
518
I.homogeneousHull 𝒜 =
527
519
⨆ i, ⟨Ideal.span (GradedRing.proj 𝒜 i '' I), Ideal.homogeneous_span 𝒜 _ (by
528
520
rintro _ ⟨x, -, rfl⟩
529
- apply SetLike.homogeneous_coe )⟩ := by
521
+ apply SetLike.isHomogeneousElem_coe )⟩ := by
530
522
ext1
531
523
rw [Ideal.toIdeal_homogeneousHull_eq_iSup, toIdeal_iSup]
532
- rfl
533
524
534
525
end HomogeneousHull
535
526
0 commit comments