File: Mathlib/RingTheory/PrimeSpectrum.lean

full_name: PrimeSpectrum.asIdeal
code: /-- The prime spectrum of a commutative (semi)ring `R` is the type of all prime ideals of `R`.

It is naturally endowed with a topology (the Zariski topology),
and a sheaf of commutative rings (see `AlgebraicGeometry.StructureSheaf`).
It is a fundamental building block in algebraic geometry. -/
@[ext]
structure PrimeSpectrum [CommSemiring R] where
  asIdeal : Ideal R
  isPrime : asIdeal.IsPrime
goal: Ideal R

full_name: PrimeSpectrum
code: /-- The prime spectrum of a commutative (semi)ring `R` is the type of all prime ideals of `R`.

It is naturally endowed with a topology (the Zariski topology),
and a sheaf of commutative rings (see `AlgebraicGeometry.StructureSheaf`).
It is a fundamental building block in algebraic geometry. -/
@[ext]
structure PrimeSpectrum [CommSemiring R] where
  asIdeal : Ideal R
  isPrime : asIdeal.IsPrime
goal: Type u

full_name: PrimeSpectrum.isPrime
code: /-- The prime spectrum of a commutative (semi)ring `R` is the type of all prime ideals of `R`.

It is naturally endowed with a topology (the Zariski topology),
and a sheaf of commutative rings (see `AlgebraicGeometry.StructureSheaf`).
It is a fundamental building block in algebraic geometry. -/
@[ext]
structure PrimeSpectrum [CommSemiring R] where
  asIdeal : Ideal R
  isPrime : asIdeal.IsPrime
goal: self.asIdeal.IsPrime

full_name: PrimeSpectrum.instNonemptyOfNontrivial
code: instance [Nontrivial R] : Nonempty <| PrimeSpectrum R 
goal: Nonempty (PrimeSpectrum R)

full_name: PrimeSpectrum.instIsEmptyOfSubsingleton
code: /-- The prime spectrum of the zero ring is empty. -/
instance [Subsingleton R] : IsEmpty (PrimeSpectrum R) 
goal: IsEmpty (PrimeSpectrum R)

full_name: PrimeSpectrum.primeSpectrumProdOfSum
code: /-- The map from the direct sum of prime spectra to the prime spectrum of a direct product. -/
@[simp]
def primeSpectrumProdOfSum : PrimeSpectrum R ⊕ PrimeSpectrum S → PrimeSpectrum (R × S)
  
goal: PrimeSpectrum R ⊕ PrimeSpectrum S → PrimeSpectrum (R × S)

full_name: PrimeSpectrum.primeSpectrumProd
code: /-- The prime spectrum of `R × S` is in bijection with the disjoint unions of the prime spectrum of
`R` and the prime spectrum of `S`. -/
noncomputable def primeSpectrumProd :
    PrimeSpectrum (R × S) ≃ PrimeSpectrum R ⊕ PrimeSpectrum S 
goal: PrimeSpectrum (R × S) ≃ PrimeSpectrum R ⊕ PrimeSpectrum S

full_name: PrimeSpectrum.primeSpectrumProd_symm_inl_asIdeal
code: @[simp]
theorem primeSpectrumProd_symm_inl_asIdeal (x : PrimeSpectrum R) :
    ((primeSpectrumProd R S).symm <| Sum.inl x).asIdeal = Ideal.prod x.asIdeal ⊤ 
goal: ((PrimeSpectrum.primeSpectrumProd R S).symm (Sum.inl x)).asIdeal = x.asIdeal.prod ⊤

full_name: PrimeSpectrum.primeSpectrumProd_symm_inr_asIdeal
code: @[simp]
theorem primeSpectrumProd_symm_inr_asIdeal (x : PrimeSpectrum S) :
    ((primeSpectrumProd R S).symm <| Sum.inr x).asIdeal = Ideal.prod ⊤ x.asIdeal 
goal: ((PrimeSpectrum.primeSpectrumProd R S).symm (Sum.inr x)).asIdeal = ⊤.prod x.asIdeal

full_name: PrimeSpectrum.zeroLocus
code: /-- The zero locus of a set `s` of elements of a commutative (semi)ring `R` is the set of all
prime ideals of the ring that contain the set `s`.

An element `f` of `R` can be thought of as a dependent function on the prime spectrum of `R`.
At a point `x` (a prime ideal) the function (i.e., element) `f` takes values in the quotient ring
`R` modulo the prime ideal `x`. In this manner, `zeroLocus s` is exactly the subset of
`PrimeSpectrum R` where all "functions" in `s` vanish simultaneously.
-/
def zeroLocus (s : Set R) : Set (PrimeSpectrum R) 
goal: Set (PrimeSpectrum R)

full_name: PrimeSpectrum.mem_zeroLocus
code: @[simp]
theorem mem_zeroLocus (x : PrimeSpectrum R) (s : Set R) : x ∈ zeroLocus s ↔ s ⊆ x.asIdeal 
goal: x ∈ PrimeSpectrum.zeroLocus s ↔ s ⊆ ↑x.asIdeal

full_name: PrimeSpectrum.zeroLocus_span
code: @[simp]
theorem zeroLocus_span (s : Set R) : zeroLocus (Ideal.span s : Set R) = zeroLocus s 
goal: PrimeSpectrum.zeroLocus ↑(Ideal.span s) = PrimeSpectrum.zeroLocus s

full_name: PrimeSpectrum.vanishingIdeal
code: /-- The vanishing ideal of a set `t` of points of the prime spectrum of a commutative ring `R` is
the intersection of all the prime ideals in the set `t`.

An element `f` of `R` can be thought of as a dependent function on the prime spectrum of `R`.
At a point `x` (a prime ideal) the function (i.e., element) `f` takes values in the quotient ring
`R` modulo the prime ideal `x`. In this manner, `vanishingIdeal t` is exactly the ideal of `R`
consisting of all "functions" that vanish on all of `t`.
-/
def vanishingIdeal (t : Set (PrimeSpectrum R)) : Ideal R 
goal: Ideal R

full_name: PrimeSpectrum.coe_vanishingIdeal
code: theorem coe_vanishingIdeal (t : Set (PrimeSpectrum R)) :
    (vanishingIdeal t : Set R) = { f : R | ∀ x ∈ t, f ∈ x.asIdeal } 
goal: ↑(PrimeSpectrum.vanishingIdeal t) = {f | ∀ x ∈ t, f ∈ x.asIdeal}

full_name: PrimeSpectrum.mem_vanishingIdeal
code: theorem mem_vanishingIdeal (t : Set (PrimeSpectrum R)) (f : R) :
    f ∈ vanishingIdeal t ↔ ∀ x ∈ t, f ∈ x.asIdeal 
goal: f ∈ PrimeSpectrum.vanishingIdeal t ↔ ∀ x ∈ t, f ∈ x.asIdeal

full_name: PrimeSpectrum.vanishingIdeal_singleton
code: @[simp]
theorem vanishingIdeal_singleton (x : PrimeSpectrum R) :
    vanishingIdeal ({x} : Set (PrimeSpectrum R)) = x.asIdeal 
goal: PrimeSpectrum.vanishingIdeal {x} = x.asIdeal

full_name: PrimeSpectrum.subset_zeroLocus_iff_le_vanishingIdeal
code: theorem subset_zeroLocus_iff_le_vanishingIdeal (t : Set (PrimeSpectrum R)) (I : Ideal R) :
    t ⊆ zeroLocus I ↔ I ≤ vanishingIdeal t 
goal: t ⊆ PrimeSpectrum.zeroLocus ↑I ↔ I ≤ PrimeSpectrum.vanishingIdeal t

full_name: PrimeSpectrum.gc
code: /-- `zeroLocus` and `vanishingIdeal` form a galois connection. -/
theorem gc :
    @GaloisConnection (Ideal R) (Set (PrimeSpectrum R))ᵒᵈ _ _ (fun I => zeroLocus I) fun t =>
      vanishingIdeal t 
goal: GaloisConnection (fun I => PrimeSpectrum.zeroLocus ↑I) fun t => PrimeSpectrum.vanishingIdeal t

full_name: PrimeSpectrum.gc_set
code: /-- `zeroLocus` and `vanishingIdeal` form a galois connection. -/
theorem gc_set :
    @GaloisConnection (Set R) (Set (PrimeSpectrum R))ᵒᵈ _ _ (fun s => zeroLocus s) fun t =>
      vanishingIdeal t 
goal: GaloisConnection (fun s => PrimeSpectrum.zeroLocus s) fun t => ↑(PrimeSpectrum.vanishingIdeal t)

full_name: PrimeSpectrum.subset_zeroLocus_iff_subset_vanishingIdeal
code: theorem subset_zeroLocus_iff_subset_vanishingIdeal (t : Set (PrimeSpectrum R)) (s : Set R) :
    t ⊆ zeroLocus s ↔ s ⊆ vanishingIdeal t 
goal: t ⊆ PrimeSpectrum.zeroLocus s ↔ s ⊆ ↑(PrimeSpectrum.vanishingIdeal t)

full_name: PrimeSpectrum.subset_vanishingIdeal_zeroLocus
code: theorem subset_vanishingIdeal_zeroLocus (s : Set R) : s ⊆ vanishingIdeal (zeroLocus s) 
goal: s ⊆ ↑(PrimeSpectrum.vanishingIdeal (PrimeSpectrum.zeroLocus s))

full_name: PrimeSpectrum.le_vanishingIdeal_zeroLocus
code: theorem le_vanishingIdeal_zeroLocus (I : Ideal R) : I ≤ vanishingIdeal (zeroLocus I) 
goal: I ≤ PrimeSpectrum.vanishingIdeal (PrimeSpectrum.zeroLocus ↑I)

full_name: PrimeSpectrum.vanishingIdeal_zeroLocus_eq_radical
code: @[simp]
theorem vanishingIdeal_zeroLocus_eq_radical (I : Ideal R) :
    vanishingIdeal (zeroLocus (I : Set R)) = I.radical 
goal: PrimeSpectrum.vanishingIdeal (PrimeSpectrum.zeroLocus ↑I) = I.radical

full_name: PrimeSpectrum.zeroLocus_radical
code: @[simp]
theorem zeroLocus_radical (I : Ideal R) : zeroLocus (I.radical : Set R) = zeroLocus I 
goal: PrimeSpectrum.zeroLocus ↑I.radical = PrimeSpectrum.zeroLocus ↑I

full_name: PrimeSpectrum.subset_zeroLocus_vanishingIdeal
code: theorem subset_zeroLocus_vanishingIdeal (t : Set (PrimeSpectrum R)) :
    t ⊆ zeroLocus (vanishingIdeal t) 
goal: t ⊆ PrimeSpectrum.zeroLocus ↑(PrimeSpectrum.vanishingIdeal t)

full_name: PrimeSpectrum.zeroLocus_anti_mono
code: theorem zeroLocus_anti_mono {s t : Set R} (h : s ⊆ t) : zeroLocus t ⊆ zeroLocus s 
goal: PrimeSpectrum.zeroLocus t ⊆ PrimeSpectrum.zeroLocus s

full_name: PrimeSpectrum.zeroLocus_anti_mono_ideal
code: theorem zeroLocus_anti_mono_ideal {s t : Ideal R} (h : s ≤ t) :
    zeroLocus (t : Set R) ⊆ zeroLocus (s : Set R) 
goal: PrimeSpectrum.zeroLocus ↑t ⊆ PrimeSpectrum.zeroLocus ↑s

full_name: PrimeSpectrum.vanishingIdeal_anti_mono
code: theorem vanishingIdeal_anti_mono {s t : Set (PrimeSpectrum R)} (h : s ⊆ t) :
    vanishingIdeal t ≤ vanishingIdeal s 
goal: PrimeSpectrum.vanishingIdeal t ≤ PrimeSpectrum.vanishingIdeal s

full_name: PrimeSpectrum.zeroLocus_subset_zeroLocus_iff
code: theorem zeroLocus_subset_zeroLocus_iff (I J : Ideal R) :
    zeroLocus (I : Set R) ⊆ zeroLocus (J : Set R) ↔ J ≤ I.radical 
goal: PrimeSpectrum.zeroLocus ↑I ⊆ PrimeSpectrum.zeroLocus ↑J ↔ J ≤ I.radical

full_name: PrimeSpectrum.zeroLocus_subset_zeroLocus_singleton_iff
code: theorem zeroLocus_subset_zeroLocus_singleton_iff (f g : R) :
    zeroLocus ({f} : Set R) ⊆ zeroLocus {g} ↔ g ∈ (Ideal.span ({f} : Set R)).radical 
goal: PrimeSpectrum.zeroLocus {f} ⊆ PrimeSpectrum.zeroLocus {g} ↔ g ∈ (Ideal.span {f}).radical

full_name: PrimeSpectrum.zeroLocus_bot
code: theorem zeroLocus_bot : zeroLocus ((⊥ : Ideal R) : Set R) = Set.univ 
goal: PrimeSpectrum.zeroLocus ↑⊥ = Set.univ

full_name: PrimeSpectrum.zeroLocus_singleton_zero
code: @[simp]
theorem zeroLocus_singleton_zero : zeroLocus ({0} : Set R) = Set.univ 
goal: PrimeSpectrum.zeroLocus {0} = Set.univ

full_name: PrimeSpectrum.zeroLocus_empty
code: @[simp]
theorem zeroLocus_empty : zeroLocus (∅ : Set R) = Set.univ 
goal: PrimeSpectrum.zeroLocus ∅ = Set.univ

full_name: PrimeSpectrum.vanishingIdeal_empty
code: @[simp]
theorem vanishingIdeal_empty : vanishingIdeal (∅ : Set (PrimeSpectrum R)) = ⊤ 
goal: PrimeSpectrum.vanishingIdeal ∅ = ⊤

full_name: PrimeSpectrum.zeroLocus_empty_of_one_mem
code: theorem zeroLocus_empty_of_one_mem {s : Set R} (h : (1 : R) ∈ s) : zeroLocus s = ∅ 
goal: PrimeSpectrum.zeroLocus s = ∅

full_name: PrimeSpectrum.zeroLocus_singleton_one
code: @[simp]
theorem zeroLocus_singleton_one : zeroLocus ({1} : Set R) = ∅ 
goal: PrimeSpectrum.zeroLocus {1} = ∅

full_name: PrimeSpectrum.zeroLocus_empty_iff_eq_top
code: theorem zeroLocus_empty_iff_eq_top {I : Ideal R} : zeroLocus (I : Set R) = ∅ ↔ I = ⊤ 
goal: PrimeSpectrum.zeroLocus ↑I = ∅ ↔ I = ⊤

full_name: PrimeSpectrum.zeroLocus_univ
code: @[simp]
theorem zeroLocus_univ : zeroLocus (Set.univ : Set R) = ∅ 
goal: PrimeSpectrum.zeroLocus Set.univ = ∅

full_name: PrimeSpectrum.vanishingIdeal_eq_top_iff
code: theorem vanishingIdeal_eq_top_iff {s : Set (PrimeSpectrum R)} : vanishingIdeal s = ⊤ ↔ s = ∅ 
goal: PrimeSpectrum.vanishingIdeal s = ⊤ ↔ s = ∅

full_name: PrimeSpectrum.zeroLocus_eq_top_iff
code: theorem zeroLocus_eq_top_iff (s : Set R) :
    zeroLocus s = ⊤ ↔ s ⊆ nilradical R 
goal: PrimeSpectrum.zeroLocus s = ⊤ ↔ s ⊆ ↑(nilradical R)

full_name: PrimeSpectrum.zeroLocus_sup
code: theorem zeroLocus_sup (I J : Ideal R) :
    zeroLocus ((I ⊔ J : Ideal R) : Set R) = zeroLocus I ∩ zeroLocus J 
goal: PrimeSpectrum.zeroLocus ↑(I ⊔ J) = PrimeSpectrum.zeroLocus ↑I ∩ PrimeSpectrum.zeroLocus ↑J

full_name: PrimeSpectrum.zeroLocus_union
code: theorem zeroLocus_union (s s' : Set R) : zeroLocus (s ∪ s') = zeroLocus s ∩ zeroLocus s' 
goal: PrimeSpectrum.zeroLocus (s ∪ s') = PrimeSpectrum.zeroLocus s ∩ PrimeSpectrum.zeroLocus s'

full_name: PrimeSpectrum.vanishingIdeal_union
code: theorem vanishingIdeal_union (t t' : Set (PrimeSpectrum R)) :
    vanishingIdeal (t ∪ t') = vanishingIdeal t ⊓ vanishingIdeal t' 
goal: PrimeSpectrum.vanishingIdeal (t ∪ t') = PrimeSpectrum.vanishingIdeal t ⊓ PrimeSpectrum.vanishingIdeal t'

full_name: PrimeSpectrum.zeroLocus_iSup
code: theorem zeroLocus_iSup {ι : Sort*} (I : ι → Ideal R) :
    zeroLocus ((⨆ i, I i : Ideal R) : Set R) = ⋂ i, zeroLocus (I i) 
goal: PrimeSpectrum.zeroLocus ↑(⨆ i, I i) = ⋂ i, PrimeSpectrum.zeroLocus ↑(I i)

full_name: PrimeSpectrum.zeroLocus_iUnion
code: theorem zeroLocus_iUnion {ι : Sort*} (s : ι → Set R) :
    zeroLocus (⋃ i, s i) = ⋂ i, zeroLocus (s i) 
goal: PrimeSpectrum.zeroLocus (⋃ i, s i) = ⋂ i, PrimeSpectrum.zeroLocus (s i)

full_name: PrimeSpectrum.zeroLocus_iUnion₂
code: theorem zeroLocus_iUnion₂ {ι : Sort*} {κ : (i : ι) → Sort*} (s : ∀ i, κ i → Set R) :
    zeroLocus (⋃ (i) (j), s i j) = ⋂ (i) (j), zeroLocus (s i j) 
goal: PrimeSpectrum.zeroLocus (⋃ i, ⋃ j, s i j) = ⋂ i, ⋂ j, PrimeSpectrum.zeroLocus (s i j)

full_name: PrimeSpectrum.zeroLocus_bUnion
code: theorem zeroLocus_bUnion (s : Set (Set R)) :
    zeroLocus (⋃ s' ∈ s, s' : Set R) = ⋂ s' ∈ s, zeroLocus s' 
goal: PrimeSpectrum.zeroLocus (⋃ s' ∈ s, s') = ⋂ s' ∈ s, PrimeSpectrum.zeroLocus s'

full_name: PrimeSpectrum.vanishingIdeal_iUnion
code: theorem vanishingIdeal_iUnion {ι : Sort*} (t : ι → Set (PrimeSpectrum R)) :
    vanishingIdeal (⋃ i, t i) = ⨅ i, vanishingIdeal (t i) 
goal: PrimeSpectrum.vanishingIdeal (⋃ i, t i) = ⨅ i, PrimeSpectrum.vanishingIdeal (t i)

full_name: PrimeSpectrum.zeroLocus_inf
code: theorem zeroLocus_inf (I J : Ideal R) :
    zeroLocus ((I ⊓ J : Ideal R) : Set R) = zeroLocus I ∪ zeroLocus J 
goal: PrimeSpectrum.zeroLocus ↑(I ⊓ J) = PrimeSpectrum.zeroLocus ↑I ∪ PrimeSpectrum.zeroLocus ↑J

full_name: PrimeSpectrum.union_zeroLocus
code: theorem union_zeroLocus (s s' : Set R) :
    zeroLocus s ∪ zeroLocus s' = zeroLocus (Ideal.span s ⊓ Ideal.span s' : Ideal R) 
goal: PrimeSpectrum.zeroLocus s ∪ PrimeSpectrum.zeroLocus s' = PrimeSpectrum.zeroLocus ↑(Ideal.span s ⊓ Ideal.span s')

full_name: PrimeSpectrum.zeroLocus_mul
code: theorem zeroLocus_mul (I J : Ideal R) :
    zeroLocus ((I * J : Ideal R) : Set R) = zeroLocus I ∪ zeroLocus J 
goal: PrimeSpectrum.zeroLocus ↑(I * J) = PrimeSpectrum.zeroLocus ↑I ∪ PrimeSpectrum.zeroLocus ↑J

full_name: PrimeSpectrum.zeroLocus_singleton_mul
code: theorem zeroLocus_singleton_mul (f g : R) :
    zeroLocus ({f * g} : Set R) = zeroLocus {f} ∪ zeroLocus {g} 
goal: PrimeSpectrum.zeroLocus {f * g} = PrimeSpectrum.zeroLocus {f} ∪ PrimeSpectrum.zeroLocus {g}

full_name: PrimeSpectrum.zeroLocus_pow
code: @[simp]
theorem zeroLocus_pow (I : Ideal R) {n : ℕ} (hn : n ≠ 0) :
    zeroLocus ((I ^ n : Ideal R) : Set R) = zeroLocus I 
goal: PrimeSpectrum.zeroLocus ↑(I ^ n) = PrimeSpectrum.zeroLocus ↑I

full_name: PrimeSpectrum.zeroLocus_singleton_pow
code: @[simp]
theorem zeroLocus_singleton_pow (f : R) (n : ℕ) (hn : 0 < n) :
    zeroLocus ({f ^ n} : Set R) = zeroLocus {f} 
goal: PrimeSpectrum.zeroLocus {f ^ n} = PrimeSpectrum.zeroLocus {f}

full_name: PrimeSpectrum.sup_vanishingIdeal_le
code: theorem sup_vanishingIdeal_le (t t' : Set (PrimeSpectrum R)) :
    vanishingIdeal t ⊔ vanishingIdeal t' ≤ vanishingIdeal (t ∩ t') 
goal: PrimeSpectrum.vanishingIdeal t ⊔ PrimeSpectrum.vanishingIdeal t' ≤ PrimeSpectrum.vanishingIdeal (t ∩ t')

full_name: PrimeSpectrum.mem_compl_zeroLocus_iff_not_mem
code: theorem mem_compl_zeroLocus_iff_not_mem {f : R} {I : PrimeSpectrum R} :
    I ∈ (zeroLocus {f} : Set (PrimeSpectrum R))ᶜ ↔ f ∉ I.asIdeal 
goal: I ∈ (PrimeSpectrum.zeroLocus {f})ᶜ ↔ f ∉ I.asIdeal

full_name: PrimeSpectrum.instPartialOrder
code: instance : PartialOrder (PrimeSpectrum R) 
goal: PartialOrder (PrimeSpectrum R)

full_name: PrimeSpectrum.asIdeal_le_asIdeal
code: @[simp]
theorem asIdeal_le_asIdeal (x y : PrimeSpectrum R) : x.asIdeal ≤ y.asIdeal ↔ x ≤ y 
goal: x.asIdeal ≤ y.asIdeal ↔ x ≤ y

full_name: PrimeSpectrum.asIdeal_lt_asIdeal
code: @[simp]
theorem asIdeal_lt_asIdeal (x y : PrimeSpectrum R) : x.asIdeal < y.asIdeal ↔ x < y 
goal: x.asIdeal < y.asIdeal ↔ x < y

full_name: PrimeSpectrum.instOrderBotOfIsDomain
code: instance [IsDomain R] : OrderBot (PrimeSpectrum R) 
goal: OrderBot (PrimeSpectrum R)

full_name: PrimeSpectrum.instUnique
code: instance {R : Type*} [Field R] : Unique (PrimeSpectrum R) 
goal: Unique (PrimeSpectrum R)

full_name: PrimeSpectrum.exists_primeSpectrum_prod_le
code: /-- In a noetherian ring, every ideal contains a product of prime ideals
([samuel, § 3.3, Lemma 3])-/
theorem exists_primeSpectrum_prod_le (I : Ideal R) :
    ∃ Z : Multiset (PrimeSpectrum R), Multiset.prod (Z.map asIdeal) ≤ I 
goal: ∃ Z, (Multiset.map PrimeSpectrum.asIdeal Z).prod ≤ I

full_name: PrimeSpectrum.exists_primeSpectrum_prod_le_and_ne_bot_of_domain
code: /-- In a noetherian integral domain which is not a field, every non-zero ideal contains a non-zero
  product of prime ideals; in a field, the whole ring is a non-zero ideal containing only 0 as
  product or prime ideals ([samuel, § 3.3, Lemma 3]) -/
theorem exists_primeSpectrum_prod_le_and_ne_bot_of_domain (h_fA : ¬IsField A) {I : Ideal A}
    (h_nzI : I ≠ ⊥) :
    ∃ Z : Multiset (PrimeSpectrum A),
      Multiset.prod (Z.map asIdeal) ≤ I ∧ Multiset.prod (Z.map asIdeal) ≠ ⊥ 
goal: ∃ Z, (Multiset.map PrimeSpectrum.asIdeal Z).prod ≤ I ∧ (Multiset.map PrimeSpectrum.asIdeal Z).prod ≠ ⊥