Skip to content

Commit 995a19c

Browse files
committed
feat(AlgebraicGeometry): vanishing ideal of a subset of scheme (#21434)
1 parent 5dc4885 commit 995a19c

File tree

1 file changed

+128
-0
lines changed

1 file changed

+128
-0
lines changed

Mathlib/AlgebraicGeometry/IdealSheaf.lean

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ We define ideal sheaves of schemes and provide various constructors for it.
2222
Over affine schemes, ideal sheaves are in bijection with ideals of the global sections.
2323
* `AlgebraicGeometry.Scheme.IdealSheafData.support`:
2424
The support of an ideal sheaf.
25+
* `AlgebraicGeometry.Scheme.IdealSheafData.vanishingIdeal`:
26+
The vanishing ideal of a set.
27+
28+
## Main result
29+
* `AlgebraicGeometry.Scheme.IdealSheafData.gc`:
30+
`support` and `vanishingIdeal` forms a galois connection.
2531
2632
## Implementation detail
2733
@@ -297,4 +303,126 @@ lemma support_eq_empty_iff : support I = ∅ ↔ I = ⊤ := by
297303

298304
end support
299305

306+
section ofIsClosed
307+
308+
open _root_.PrimeSpectrum TopologicalSpace
309+
310+
/-- The radical of a ideal sheaf. -/
311+
@[simps]
312+
def radical (I : IdealSheafData X) : IdealSheafData X where
313+
ideal U := (I.ideal U).radical
314+
map_ideal_basicOpen U f :=
315+
letI : Algebra Γ(X, U) Γ(X, X.affineBasicOpen f) :=
316+
(X.presheaf.map (homOfLE (X.basicOpen_le f)).op).hom.toAlgebra
317+
have : IsLocalization.Away f Γ(X, X.basicOpen f) := U.2.isLocalization_of_eq_basicOpen _ _ rfl
318+
(IsLocalization.map_radical (.powers f) Γ(X, X.basicOpen f) (I.ideal U)).trans
319+
congr($(I.map_ideal_basicOpen U f).radical)
320+
321+
/-- The nilradical of a scheme. -/
322+
def _root_.AlgebraicGeometry.Scheme.nilradical (X : Scheme.{u}) : IdealSheafData X :=
323+
.radical ⊥
324+
325+
lemma le_radical : I ≤ I.radical := fun _ ↦ Ideal.le_radical
326+
327+
@[simp]
328+
lemma radical_top : radical (X := X) ⊤ = ⊤ := top_le_iff.mp (le_radical _)
329+
330+
lemma radical_bot : radical ⊥ = nilradical X := rfl
331+
332+
lemma radical_sup {I J : IdealSheafData X} :
333+
radical (I ⊔ J) = radical (radical I ⊔ radical J) := by
334+
ext U : 2
335+
exact (Ideal.radical_sup (I.ideal U) (J.ideal U))
336+
337+
@[simp]
338+
lemma radical_inf {I J : IdealSheafData X} :
339+
radical (I ⊓ J) = (radical I ⊓ radical J) := by
340+
ext U : 2
341+
simp only [radical_ideal, ideal_inf, Pi.inf_apply, Ideal.radical_inf]
342+
343+
/-- The vanishing ideal sheaf of a set,
344+
which is the largest ideal sheaf whose support contains a subset.
345+
When the set `Z` is closed, the reduced induced scheme structure is the quotient of this ideal. -/
346+
@[simps]
347+
nonrec def vanishingIdeal (Z : Set X) : IdealSheafData X where
348+
ideal U := vanishingIdeal (U.2.fromSpec.base ⁻¹' Z)
349+
map_ideal_basicOpen U f := by
350+
let F := X.presheaf.map (homOfLE (X.basicOpen_le f)).op
351+
apply le_antisymm
352+
· rw [Ideal.map_le_iff_le_comap]
353+
intro x hx
354+
suffices ∀ p, (X.affineBasicOpen f).2.fromSpec.base p ∈ Z → F.hom x ∈ p.asIdeal by
355+
simpa [PrimeSpectrum.mem_vanishingIdeal] using this
356+
intro x hxZ
357+
refine (PrimeSpectrum.mem_vanishingIdeal _ _).mp hx
358+
((Spec.map (X.presheaf.map (homOfLE _).op)).base x) ?_
359+
rwa [Set.mem_preimage, ← Scheme.comp_base_apply,
360+
IsAffineOpen.map_fromSpec _ (X.affineBasicOpen f).2]
361+
· letI : Algebra Γ(X, U) Γ(X, X.affineBasicOpen f) := F.hom.toAlgebra
362+
have : IsLocalization.Away f Γ(X, X.basicOpen f) :=
363+
U.2.isLocalization_of_eq_basicOpen _ _ rfl
364+
intro x hx
365+
dsimp only at hx ⊢
366+
have : Topology.IsOpenEmbedding (Spec.map F).base :=
367+
localization_away_isOpenEmbedding Γ(X, X.basicOpen f) f
368+
rw [← U.2.map_fromSpec (X.affineBasicOpen f).2 (homOfLE (X.basicOpen_le f)).op,
369+
Scheme.comp_base, TopCat.coe_comp, Set.preimage_comp] at hx
370+
generalize U.2.fromSpec.base ⁻¹' Z = Z' at hx ⊢
371+
replace hx : x ∈ vanishingIdeal ((Spec.map F).base ⁻¹' Z') := hx
372+
obtain ⟨I, hI, e⟩ := (isClosed_iff_zeroLocus_radical_ideal _).mp (isClosed_closure (s := Z'))
373+
rw [← vanishingIdeal_closure,
374+
← this.isOpenMap.preimage_closure_eq_closure_preimage this.continuous, e] at hx
375+
rw [← vanishingIdeal_closure, e]
376+
erw [preimage_comap_zeroLocus] at hx
377+
rwa [← PrimeSpectrum.zeroLocus_span, ← Ideal.map, vanishingIdeal_zeroLocus_eq_radical,
378+
← RingHom.algebraMap_toAlgebra (X.presheaf.map _).hom,
379+
← IsLocalization.map_radical (.powers f), ← vanishingIdeal_zeroLocus_eq_radical] at hx
380+
381+
lemma subset_support_iff_le_vanishingIdeal {I : X.IdealSheafData} {Z : Set X} :
382+
Z ⊆ I.support ↔ I ≤ vanishingIdeal Z := by
383+
simp only [le_def, vanishingIdeal_ideal, ← PrimeSpectrum.subset_zeroLocus_iff_le_vanishingIdeal]
384+
trans ∀ U : X.affineOpens, Z ∩ U ⊆ I.support ∩ U
385+
· refine ⟨fun H U x hx ↦ ⟨H hx.1, hx.2⟩, fun H x hx ↦ ?_⟩
386+
obtain ⟨_, ⟨U, hU, rfl⟩, hxU, -⟩ :=
387+
(isBasis_affine_open X).exists_subset_of_mem_open (Set.mem_univ x) isOpen_univ
388+
exact (H ⟨U, hU⟩ ⟨hx, hxU⟩).1
389+
refine forall_congr' fun U ↦ ?_
390+
rw [support_inter, ← Set.image_subset_image_iff U.2.fromSpec.isOpenEmbedding.injective,
391+
Set.image_preimage_eq_inter_range, IsAffineOpen.fromSpec_image_zeroLocus,
392+
IsAffineOpen.range_fromSpec]
393+
394+
/-- `support` and `vanishingIdeal` forms a galois connection.
395+
This is the global version of `PrimeSpectrum.gc`. -/
396+
lemma gc : @GaloisConnection X.IdealSheafData (Set X)ᵒᵈ _ _ (support ·) (vanishingIdeal ·) :=
397+
fun _ _ ↦ subset_support_iff_le_vanishingIdeal
398+
399+
lemma vanishingIdeal_antimono {S T : Set X} (h : S ⊆ T) : vanishingIdeal T ≤ vanishingIdeal S :=
400+
gc.monotone_u h
401+
402+
lemma support_vanishingIdeal {Z : Set X} :
403+
(vanishingIdeal Z).support = closure Z := by
404+
ext x
405+
obtain ⟨_, ⟨U, hU, rfl⟩, hxU, -⟩ :=
406+
(isBasis_affine_open X).exists_subset_of_mem_open (Set.mem_univ x) isOpen_univ
407+
trans x ∈ (vanishingIdeal Z).support ∩ U
408+
· simp [hxU]
409+
rw [(vanishingIdeal Z).support_inter ⟨U, hU⟩, ← hU.fromSpec_image_zeroLocus,
410+
vanishingIdeal, zeroLocus_vanishingIdeal_eq_closure,
411+
← hU.fromSpec.isOpenEmbedding.isOpenMap.preimage_closure_eq_closure_preimage
412+
hU.fromSpec.base.1.2,
413+
Set.image_preimage_eq_inter_range]
414+
simp [hxU]
415+
416+
lemma vanishingIdeal_support {I : IdealSheafData X} :
417+
vanishingIdeal I.support = I.radical := by
418+
ext U : 2
419+
dsimp
420+
rw [← vanishingIdeal_zeroLocus_eq_radical]
421+
congr 1
422+
apply U.2.fromSpec.isOpenEmbedding.injective.image_injective
423+
rw [Set.image_preimage_eq_inter_range, IsAffineOpen.range_fromSpec,
424+
IsAffineOpen.fromSpec_image_zeroLocus, support_inter]
425+
426+
end ofIsClosed
427+
300428
end AlgebraicGeometry.Scheme.IdealSheafData

0 commit comments

Comments
 (0)