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

Commit ea149c8

Browse files
feat(algebraic_geometry/prime_spectrum): prime spectrum of a ring is compact (#1987)
* wip * wip * wip * wip * WIP * WIP * Reset changes that belong to other PR * Docstrings * Add Heine--Borel to docstring * Cantor's intersection theorem * Cantor for sequences * Revert "Reset changes that belong to other PR" This reverts commit e6026b8. * Move submodule lemmas to other file * Fix build * Update prime_spectrum.lean * Docstring * Update prime_spectrum.lean * Slight improvement? * Slightly improve structure of proof * WIP * Cleaning up proofs * Final fixes Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent d615ee6 commit ea149c8

File tree

4 files changed

+78
-7
lines changed

4 files changed

+78
-7
lines changed

src/algebraic_geometry/prime_spectrum.lean

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Authors: Johan Commelin
66

77
import topology.opens
88
import ring_theory.ideal_operations
9+
import linear_algebra.finsupp
910

1011
/-!
1112
# Prime spectrum of a commutative ring
@@ -358,4 +359,25 @@ begin
358359
exact subset_zero_locus_vanishing_ideal t }
359360
end
360361

362+
/-- The prime spectrum of a commutative ring is a compact topological space. -/
363+
instance : compact_space (prime_spectrum R) :=
364+
begin
365+
apply compact_space_of_finite_subfamily_closed,
366+
intros ι Z hZc hZ,
367+
let I : ι → ideal R := λ i, vanishing_ideal (Z i),
368+
have hI : ∀ i, Z i = zero_locus (I i),
369+
{ intro i,
370+
rw [zero_locus_vanishing_ideal_eq_closure, closure_eq_of_is_closed],
371+
exact hZc i },
372+
have one_mem : (1:R) ∈ ⨆ (i : ι), I i,
373+
{ rw [← ideal.eq_top_iff_one, ← zero_locus_empty_iff_eq_top, zero_locus_supr],
374+
simpa only [hI] using hZ },
375+
obtain ⟨s, hs⟩ : ∃ s : finset ι, (1:R) ∈ ⨆ i ∈ s, I i :=
376+
submodule.exists_finset_of_mem_supr I one_mem,
377+
show ∃ t : finset ι, (⋂ i ∈ t, Z i) = ∅,
378+
use s,
379+
rw [← ideal.eq_top_iff_one, ←zero_locus_empty_iff_eq_top] at hs,
380+
simpa only [zero_locus_supr, hI] using hs
381+
end
382+
361383
end prime_spectrum

src/linear_algebra/basic.lean

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,23 @@ lemma linear_eq_on (s : set M) {f g : M →ₗ[R] M₂} (H : ∀x∈s, f x = g x
745745
f x = g x :=
746746
by apply span_induction h H; simp {contextual := tt}
747747

748+
lemma supr_eq_span {ι : Sort w} (p : ι → submodule R M) :
749+
(⨆ (i : ι), p i) = submodule.span R (⋃ (i : ι), ↑(p i)) :=
750+
le_antisymm
751+
(lattice.supr_le $ assume i, subset.trans (assume m hm, set.mem_Union.mpr ⟨i, hm⟩) subset_span)
752+
(span_le.mpr $ Union_subset_iff.mpr $ assume i m hm, mem_supr_of_mem _ i hm)
753+
754+
lemma span_singleton_le_iff_mem (m : M) (p : submodule R M) :
755+
span R {m} ≤ p ↔ m ∈ p :=
756+
by rw [span_le, singleton_subset_iff, mem_coe]
757+
758+
lemma mem_supr {ι : Sort w} (p : ι → submodule R M) {m : M} :
759+
(m ∈ ⨆ i, p i) ↔ (∀ N, (∀ i, p i ≤ N) → m ∈ N) :=
760+
begin
761+
rw [← span_singleton_le_iff_mem, le_supr_iff],
762+
simp only [span_singleton_le_iff_mem],
763+
end
764+
748765
/-- The product of two submodules is a submodule. -/
749766
def prod : submodule R (M × M₂) :=
750767
{ carrier := set.prod p q,

src/linear_algebra/finsupp.lean

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ noncomputable theory
1111

1212
open lattice set linear_map submodule
1313

14-
namespace finsupp
15-
1614
open_locale classical
1715

16+
namespace finsupp
17+
1818
variables {α : Type*} {M : Type*} {R : Type*}
1919
variables [ring R] [add_comm_group M] [module R M]
2020

@@ -371,7 +371,7 @@ begin
371371
refine sum_mem _ _, simp [this] }
372372
end
373373

374-
theorem mem_span_iff_total {s : set α} {x : M}:
374+
theorem mem_span_iff_total {s : set α} {x : M} :
375375
x ∈ span R (v '' s) ↔ ∃ l ∈ supported R R s, finsupp.total α M R v l = x :=
376376
by rw span_eq_map_total; simp
377377

@@ -423,8 +423,37 @@ end
423423

424424
end finsupp
425425

426-
lemma linear_map.map_finsupp_total {R : Type*} {β : Type*} {γ : Type*} [ring R]
427-
[add_comm_group β] [module R β] [add_comm_group γ] [module R γ]
428-
(f : β →ₗ[R] γ) {ι : Type*} [fintype ι] {g : ι → β} (l : ι →₀ R) :
429-
f (finsupp.total ι β R g l) = finsupp.total ι γ R (f ∘ g) l :=
426+
variables {R : Type*} {M : Type*} {N : Type*}
427+
variables [ring R] [add_comm_group M] [module R M] [add_comm_group N] [module R N]
428+
429+
lemma linear_map.map_finsupp_total
430+
(f : M →ₗ[R] N) {ι : Type*} [fintype ι] {g : ι → M} (l : ι →₀ R) :
431+
f (finsupp.total ι M R g l) = finsupp.total ι N R (f ∘ g) l :=
430432
by simp only [finsupp.total_apply, finsupp.total_apply, finsupp.sum, f.map_sum, f.map_smul]
433+
434+
lemma submodule.exists_finset_of_mem_supr
435+
{ι : Sort*} (p : ι → submodule R M) {m : M} (hm : m ∈ ⨆ i, p i) :
436+
∃ s : finset ι, m ∈ ⨆ i ∈ s, p i :=
437+
begin
438+
obtain ⟨f, hf, rfl⟩ : ∃ f ∈ finsupp.supported R R (⋃ i, ↑(p i)), finsupp.total M M R id f = m,
439+
{ have aux : (id : M → M) '' (⋃ (i : ι), ↑(p i)) = (⋃ (i : ι), ↑(p i)) := set.image_id _,
440+
rwa [supr_eq_span, ← aux, finsupp.mem_span_iff_total R] at hm },
441+
let t : finset M := f.support,
442+
have ht : ∀ x : {x // x ∈ t}, ∃ i, ↑x ∈ p i,
443+
{ intros x,
444+
rw finsupp.mem_supported at hf,
445+
specialize hf x.2,
446+
rwa set.mem_Union at hf },
447+
choose g hg using ht,
448+
let s : finset ι := finset.univ.image g,
449+
use s,
450+
simp only [mem_supr, supr_le_iff],
451+
assume N hN,
452+
rw [finsupp.total_apply, finsupp.sum, ← submodule.mem_coe],
453+
apply is_add_submonoid.finset_sum_mem,
454+
assume x hx,
455+
apply submodule.smul_mem,
456+
let i : ι := g ⟨x, hx⟩,
457+
have hi : i ∈ s, { rw finset.mem_image, exact ⟨⟨x, hx⟩, finset.mem_univ _, rfl⟩ },
458+
exact hN i hi (hg _),
459+
end

src/order/complete_lattice.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,9 @@ supr_le $ le_supr _ ∘ h
266266
@[simp] theorem supr_le_iff : supr s ≤ a ↔ (∀i, s i ≤ a) :=
267267
⟨assume : supr s ≤ a, assume i, le_trans (le_supr _ _) this, supr_le⟩
268268

269+
lemma le_supr_iff : (a ≤ supr s) ↔ (∀ b, (∀ i, s i ≤ b) → a ≤ b) :=
270+
⟨λ h b hb, le_trans h (supr_le hb), λ h, h _ $ λ i, le_supr s i⟩
271+
269272
-- TODO: finish doesn't do well here.
270273
@[congr] theorem supr_congr_Prop {α : Type u} [has_Sup α] {p q : Prop} {f₁ : p → α} {f₂ : q → α}
271274
(pq : p ↔ q) (f : ∀x, f₁ (pq.mpr x) = f₂ x) : supr f₁ = supr f₂ :=

0 commit comments

Comments
 (0)