2023-06-10 10:13:10 -05:00
|
|
|
|
import Mathlib.RingTheory.Ideal.Basic
|
|
|
|
|
import Mathlib.Order.Height
|
|
|
|
|
import Mathlib.RingTheory.PrincipalIdealDomain
|
|
|
|
|
import Mathlib.RingTheory.DedekindDomain.Basic
|
|
|
|
|
import Mathlib.RingTheory.Ideal.Quotient
|
|
|
|
|
import Mathlib.RingTheory.Localization.AtPrime
|
2023-06-11 23:02:46 -05:00
|
|
|
|
import Mathlib.AlgebraicGeometry.PrimeSpectrum.Basic
|
2023-06-12 11:49:40 -05:00
|
|
|
|
import Mathlib.Order.ConditionallyCompleteLattice.Basic
|
2023-06-10 10:13:10 -05:00
|
|
|
|
|
|
|
|
|
/- This file contains the definitions of height of an ideal, and the krull
|
|
|
|
|
dimension of a commutative ring.
|
|
|
|
|
There are also sorried statements of many of the theorems that would be
|
|
|
|
|
really nice to prove.
|
|
|
|
|
I'm imagining for this file to ultimately contain basic API for height and
|
|
|
|
|
krull dimension, and the theorems will probably end up other files,
|
|
|
|
|
depending on how long the proofs are, and what extra API needs to be
|
|
|
|
|
developed.
|
|
|
|
|
-/
|
|
|
|
|
|
2023-06-11 23:02:46 -05:00
|
|
|
|
namespace Ideal
|
2023-06-10 10:13:10 -05:00
|
|
|
|
|
2023-06-11 23:02:46 -05:00
|
|
|
|
variable {R : Type _} [CommRing R] (I : PrimeSpectrum R)
|
2023-06-10 10:13:10 -05:00
|
|
|
|
|
2023-06-11 23:15:30 -05:00
|
|
|
|
noncomputable def height : ℕ∞ := Set.chainHeight {J : PrimeSpectrum R | J < I}
|
2023-06-10 10:13:10 -05:00
|
|
|
|
|
2023-06-12 11:49:40 -05:00
|
|
|
|
noncomputable def krullDim (R : Type) [CommRing R] : WithBot ℕ∞ := ⨆ (I : PrimeSpectrum R), height I
|
|
|
|
|
|
|
|
|
|
lemma height_def : height I = Set.chainHeight {J : PrimeSpectrum R | J < I} := rfl
|
|
|
|
|
lemma krullDim_def (R : Type) [CommRing R] : krullDim R = (⨆ (I : PrimeSpectrum R), height I : WithBot ℕ∞) := rfl
|
|
|
|
|
lemma krullDim_def' (R : Type) [CommRing R] : krullDim R = iSup (λ I : PrimeSpectrum R => (height I : WithBot ℕ∞)) := rfl
|
|
|
|
|
|
|
|
|
|
noncomputable instance : CompleteLattice (WithBot (ℕ∞)) := WithBot.WithTop.completeLattice
|
|
|
|
|
|
|
|
|
|
lemma krullDim_le_iff (R : Type) [CommRing R] (n : ℕ) :
|
|
|
|
|
iSup (λ I : PrimeSpectrum R => (height I : WithBot ℕ∞)) ≤ n ↔
|
|
|
|
|
∀ I : PrimeSpectrum R, (height I : WithBot ℕ∞) ≤ ↑n := by
|
|
|
|
|
convert @iSup_le_iff (WithBot ℕ∞) (PrimeSpectrum R) inferInstance _ (↑n)
|
2023-06-10 10:13:10 -05:00
|
|
|
|
|
|
|
|
|
--some propositions that would be nice to be able to eventually
|
|
|
|
|
|
2023-06-12 11:49:40 -05:00
|
|
|
|
lemma dim_eq_zero_iff_field [IsDomain R] : krullDim R = 0 ↔ IsField R := by sorry
|
2023-06-10 10:13:10 -05:00
|
|
|
|
|
|
|
|
|
#check Ring.DimensionLEOne
|
2023-06-12 11:49:40 -05:00
|
|
|
|
lemma dim_le_one_iff : krullDim R ≤ 1 ↔ Ring.DimensionLEOne R := sorry
|
2023-06-10 10:13:10 -05:00
|
|
|
|
|
2023-06-12 11:49:40 -05:00
|
|
|
|
lemma dim_le_one_of_pid [IsDomain R] [IsPrincipalIdealRing R] : krullDim R ≤ 1 := by
|
2023-06-11 23:02:46 -05:00
|
|
|
|
rw [dim_le_one_iff]
|
|
|
|
|
exact Ring.DimensionLEOne.principal_ideal_ring R
|
2023-06-10 10:13:10 -05:00
|
|
|
|
|
|
|
|
|
lemma dim_le_dim_polynomial_add_one [Nontrivial R] :
|
2023-06-12 11:49:40 -05:00
|
|
|
|
krullDim R ≤ krullDim (Polynomial R) + 1 := sorry
|
2023-06-10 10:13:10 -05:00
|
|
|
|
|
|
|
|
|
lemma dim_eq_dim_polynomial_add_one [Nontrivial R] [IsNoetherianRing R] :
|
2023-06-12 11:49:40 -05:00
|
|
|
|
krullDim R = krullDim (Polynomial R) + 1 := sorry
|
2023-06-10 10:13:10 -05:00
|
|
|
|
|
2023-06-11 23:02:46 -05:00
|
|
|
|
lemma height_eq_dim_localization :
|
2023-06-12 11:49:40 -05:00
|
|
|
|
height I = krullDim (Localization.AtPrime I.asIdeal) := sorry
|
2023-06-10 10:13:10 -05:00
|
|
|
|
|
2023-06-12 11:49:40 -05:00
|
|
|
|
lemma height_add_dim_quotient_le_dim : height I + krullDim (R ⧸ I.asIdeal) ≤ krullDim R := sorry
|