Lean library · module TopologyByExample.Spaces.PrimeIdealTopology

The prime ideal topology

Source file

The prime ideal topology is PrimeSpectrum ℤ, the prime ideals of ℤ with the Zariski topology. It has a generic point, the zero ideal (TopologyByExample.PrimeIdealTopology.generic), whose closure is the whole space, so it is locally path connected and a Baire space. It is second countable, since the basic open sets D(n), n ∈ ℤ, form a countable base. It is not R₀, not normal, and has no isolated point. It is not the closed extension of the cofinite topology on ℕ: in a closed extension the new point is isolated, while here no point is.

Main statements

Tags

prime spectrum, Zariski topology, generic point, Baire space

This file was written by Claude (Anthropic's AI model) working under the direction of David R. MacIver, who reviews it and is responsible for it.

Imports

The prime ideal topology

definition generic

TopologyByExample.PrimeIdealTopology.generic

The zero ideal of ℤ, as a point of the prime spectrum: its generic point.

def generic : PrimeSpectrum ℤ
:= ⟨⊥, Ideal.isPrime_bot⟩

definition ofPrime

TopologyByExample.PrimeIdealTopology.ofPrime

The prime ideal generated by a prime number.

def ofPrime (p : ℕ) (hp : p.Prime) : PrimeSpectrum ℤ
:=
  ⟨Ideal.span {(p : ℤ)}, (Ideal.span_singleton_prime (by exact_mod_cast hp.ne_zero)).2
    (Nat.prime_iff_prime_int.1 hp)⟩

theorem generic_specializes

TopologyByExample.PrimeIdealTopology.generic_specializes

The zero ideal specialises to every prime ideal: every point lies in its closure.

theorem generic_specializes (x : PrimeSpectrum ℤ) : generic ⤳ x
Proof
:=
  (PrimeSpectrum.le_iff_specializes _ _).1 (show (⊥ : Ideal ℤ) ≤ x.asIdeal from bot_le)

theorem isClosed_singleton_ofPrime

TopologyByExample.PrimeIdealTopology.isClosed_singleton_ofPrime

The ideal generated by a prime number is maximal, so it is a closed point.

theorem isClosed_singleton_ofPrime (p : ℕ) (hp : p.Prime) :
    IsClosed ({ofPrime p hp} : Set (PrimeSpectrum ℤ))
Proof
:=
  (PrimeSpectrum.isClosed_singleton_iff_isMaximal _).2
    (PrincipalIdealRing.isMaximal_of_irreducible (Nat.prime_iff_prime_int.1 hp).irreducible)

theorem ofPrime_ne_generic

TopologyByExample.PrimeIdealTopology.ofPrime_ne_generic

The ideal generated by a prime number is not the zero ideal.

theorem ofPrime_ne_generic (p : ℕ) (hp : p.Prime) : ofPrime p hp ≠ generic
Proof
:= fun h ↦ by
  have hmem : (p : ℤ) ∈ (ofPrime p hp).asIdeal := Ideal.subset_span rfl
  rw [h] at hmem
  exact (by exact_mod_cast hp.ne_zero : (p : ℤ) ≠ 0) ((Submodule.mem_bot ℤ).1 hmem)

theorem secondCountableTopology

TopologyByExample.PrimeIdealTopology.secondCountableTopology

The prime ideal topology is second countable: the basic open sets D(n), n ∈ ℤ, form a countable base.

theorem secondCountableTopology : SecondCountableTopology (PrimeSpectrum ℤ)
Proof
:=
  PrimeSpectrum.isTopologicalBasis_basic_opens.secondCountableTopology (countable_range _)

On this site: The prime ideal topology is second countable

theorem locallyPathConnectedSpace

TopologyByExample.PrimeIdealTopology.locallyPathConnectedSpace

The prime ideal topology is locally path connected, since it has a point whose closure is the whole space.

theorem locallyPathConnectedSpace : LocallyPathConnectedSpace (PrimeSpectrum ℤ)
Proof
:=
  locallyPathConnectedSpace_of_forall_specializes generic generic_specializes

On this site: The prime ideal topology is locally path connected

theorem baireSpace

TopologyByExample.PrimeIdealTopology.baireSpace

The prime ideal topology is a Baire space, since it has a point whose closure is the whole space.

theorem baireSpace : BaireSpace (PrimeSpectrum ℤ)
Proof
:=
  baireSpace_of_forall_specializes generic generic_specializes

On this site: The prime ideal topology is a Baire space

theorem not_r0Space

TopologyByExample.PrimeIdealTopology.not_r0Space

The prime ideal topology is not R₀: the zero ideal specialises to the ideal (2), but not conversely.

theorem not_r0Space : ¬R0Space (PrimeSpectrum ℤ)
Proof
:= fun _ ↦
  ofPrime_ne_generic 2 Nat.prime_two
    ((generic_specializes _).symm.antisymm (generic_specializes _)).eq

On this site: The prime ideal topology is not R₀

theorem not_normalSpace

TopologyByExample.PrimeIdealTopology.not_normalSpace

The prime ideal topology is not normal: {(2)} and {(3)} are disjoint closed sets, while any two nonempty open sets meet, since both contain the zero ideal.

theorem not_normalSpace : ¬NormalSpace (PrimeSpectrum ℤ)
Proof
:= fun _ ↦ by
  have h23 : ofPrime 2 Nat.prime_two ≠ ofPrime 3 Nat.prime_three := fun h ↦ by
    have hmem : (2 : ℤ) ∈ (ofPrime 3 Nat.prime_three).asIdeal := h ▸ Ideal.subset_span rfl
    obtain ⟨k, hk⟩ := Ideal.mem_span_singleton.1 hmem
    omega
  obtain ⟨U, V, hU, hV, hsU, htV, hUV⟩ := normal_separation
    (isClosed_singleton_ofPrime 2 Nat.prime_two) (isClosed_singleton_ofPrime 3 Nat.prime_three)
    (disjoint_singleton.2 h23)
  have hgU := (generic_specializes _).mem_open hU (hsU rfl)
  have hgV := (generic_specializes _).mem_open hV (htV rfl)
  exact hUV.ne_of_mem hgU hgV rfl

On this site: The prime ideal topology is not normal

theorem exists_notMem_ofPrime

TopologyByExample.PrimeIdealTopology.exists_notMem_ofPrime

A nonzero integer lies outside the ideal generated by some prime number.

theorem exists_notMem_ofPrime {n : ℤ} (hn : n ≠ 0) :
    ∃ (p : ℕ) (hp : p.Prime), n ∉ (ofPrime p hp).asIdeal
Proof
:= by
  obtain ⟨p, hle, hp⟩ := Nat.exists_infinite_primes (n.natAbs + 1)
  refine ⟨p, hp, fun hmem ↦ ?_⟩
  have hdvd : p ∣ n.natAbs := Int.natCast_dvd.1 (Ideal.mem_span_singleton.1 hmem)
  have := Nat.le_of_dvd (Int.natAbs_pos.2 hn) hdvd
  omega

theorem not_hasIsolatedPoint

TopologyByExample.PrimeIdealTopology.not_hasIsolatedPoint

The prime ideal topology has no isolated point. An open point would be the zero ideal, which lies in every nonempty open set; but the zero ideal lies in the closure of the nonzero prime ideals, since only 0 belongs to every ideal (p) with p prime.

theorem not_hasIsolatedPoint : ¬HasIsolatedPoint (PrimeSpectrum ℤ)
Proof
:= by
  rintro ⟨x, hx⟩
  have hgx : generic = x := (generic_specializes x).mem_open hx rfl
  subst hgx
  obtain ⟨s, hs⟩ := (PrimeSpectrum.isClosed_iff_zeroLocus _).1 hx.isClosed_compl
  have hsub : s ⊆ (generic : PrimeSpectrum ℤ).asIdeal := by
    intro n hn
    by_contra hn0
    obtain ⟨p, hp, hnp⟩ := exists_notMem_ofPrime (n := n) (fun h ↦ hn0 (h ▸ Submodule.zero_mem _))
    have hpmem : ofPrime p hp ∈ ({generic}ᶜ : Set (PrimeSpectrum ℤ)) := ofPrime_ne_generic p hp
    rw [hs, PrimeSpectrum.mem_zeroLocus] at hpmem
    exact hnp (hpmem hn)
  have hgen : generic ∈ ({generic}ᶜ : Set (PrimeSpectrum ℤ)) := by
    rw [hs, PrimeSpectrum.mem_zeroLocus]
    exact hsub
  exact hgen rfl

On this site: The prime ideal topology has no isolated point

On this site: Space: Prime ideal topology