2023-06-10 19:36:27 -05:00
|
|
|
|
import Mathlib.Order.KrullDimension
|
2023-06-11 01:00:13 -05:00
|
|
|
|
import Mathlib.Order.JordanHolder
|
2023-06-10 19:36:27 -05:00
|
|
|
|
import Mathlib.AlgebraicGeometry.PrimeSpectrum.Basic
|
2023-06-11 01:00:13 -05:00
|
|
|
|
import Mathlib.Order.Height
|
2023-06-09 22:13:59 -05:00
|
|
|
|
|
2023-06-10 19:36:27 -05:00
|
|
|
|
|
|
|
|
|
#check (p q : PrimeSpectrum _) → (p ≤ q)
|
|
|
|
|
#check Preorder (PrimeSpectrum _)
|
|
|
|
|
|
2023-06-11 01:00:13 -05:00
|
|
|
|
-- Dimension of a ring
|
|
|
|
|
#check krullDim (PrimeSpectrum _)
|
|
|
|
|
|
|
|
|
|
-- Length of a module
|
|
|
|
|
#check krullDim (Submodule _ _)
|
|
|
|
|
|
|
|
|
|
#check JordanHolderLattice
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
variable {α : Type _} [Preorder α] (s : Set α)
|
|
|
|
|
|
2023-06-11 01:49:28 -05:00
|
|
|
|
def finFun_to_list {n : ℕ} : (Fin n → α) → List α := by sorry
|
|
|
|
|
|
|
|
|
|
def series_to_chain : StrictSeries s → s.subchain
|
|
|
|
|
| ⟨length, toFun, strictMono⟩ =>
|
|
|
|
|
⟨ finFun_to_list (fun x => toFun x),
|
|
|
|
|
sorry⟩
|
|
|
|
|
|
|
|
|
|
|
2023-06-11 01:00:13 -05:00
|
|
|
|
-- there should be a coercion from WithTop ℕ to WithBot (WithTop ℕ) but it doesn't seem to work
|
|
|
|
|
-- it looks like this might be because someone changed the instance from CoeCT to Coe during the port
|
2023-06-11 23:02:16 -05:00
|
|
|
|
-- actually it looks like we can coerce to WithBot (ℕ∞) fine
|
2023-06-11 01:00:13 -05:00
|
|
|
|
lemma twoHeights : s ≠ ∅ → (some (Set.chainHeight s) : WithBot (WithTop ℕ)) = krullDim s := by
|
|
|
|
|
intro hs
|
|
|
|
|
unfold Set.chainHeight
|
|
|
|
|
unfold krullDim
|
|
|
|
|
have hKrullSome : ∃n, krullDim s = some n := by
|
|
|
|
|
|
|
|
|
|
sorry
|
|
|
|
|
-- norm_cast
|
2023-06-11 07:33:18 -05:00
|
|
|
|
sorry
|
|
|
|
|
|
2023-06-11 23:02:16 -05:00
|
|
|
|
namespace Ideal
|
|
|
|
|
noncomputable def krullDim (R : Type _) [CommRing R] :=
|
|
|
|
|
Set.chainHeight (Set.univ : Set (PrimeSpectrum R))
|
|
|
|
|
|
2023-06-11 07:33:18 -05:00
|
|
|
|
def krullDimGE (R : Type _) [CommRing R] (n : ℕ) :=
|
2023-06-11 23:02:16 -05:00
|
|
|
|
∃ c : List (PrimeSpectrum R), c.Chain' (· < ·) ∧ c.length = n + 1
|
|
|
|
|
|
|
|
|
|
def krullDimLE (R : Type _) [CommRing R] (n : ℕ) :=
|
|
|
|
|
∀ c : List (PrimeSpectrum R), c.Chain' (· < ·) → c.length ≤ n + 1
|
|
|
|
|
|
|
|
|
|
end Ideal
|
|
|
|
|
|
|
|
|
|
open Ideal
|
|
|
|
|
|
|
|
|
|
lemma krullDim_le (R : Type _) [CommRing R] : krullDimLE R n ↔ Ideal.krullDim R ≤ n := sorry
|
|
|
|
|
lemma krullDim_ge (R : Type _) [CommRing R] : krullDimGE R n ↔ Ideal.krullDim R ≥ n := sorry
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- #check ((4 : ℕ∞) : WithBot (WithTop ℕ))
|
|
|
|
|
#check ( (Set.chainHeight s) : WithBot (ℕ∞))
|