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-12 13:02:03 -05:00
|
|
|
|
import CommAlg.krull
|
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
|
|
|
|
|
|
|
|
|
|
|
2023-06-12 23:23:17 -05:00
|
|
|
|
section Chains
|
|
|
|
|
|
2023-06-11 01:00:13 -05:00
|
|
|
|
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-12 23:23:17 -05:00
|
|
|
|
end Chains
|
|
|
|
|
|
|
|
|
|
section Krull
|
|
|
|
|
|
|
|
|
|
variable (R : Type _) [CommRing R] (M : Type _) [AddCommGroup M] [Module R M]
|
|
|
|
|
|
2023-06-11 23:02:16 -05:00
|
|
|
|
open Ideal
|
|
|
|
|
|
2023-06-12 23:23:17 -05:00
|
|
|
|
-- chain of primes
|
|
|
|
|
#check height
|
|
|
|
|
|
|
|
|
|
-- lemma height_ge_iff {𝔭 : PrimeSpectrum R} {n : ℕ∞} :
|
|
|
|
|
-- height 𝔭 ≥ n ↔ := sorry
|
|
|
|
|
|
|
|
|
|
lemma height_ge_iff' {𝔭 : PrimeSpectrum R} {n : ℕ∞} :
|
|
|
|
|
height 𝔭 > n ↔ ∃ c : List (PrimeSpectrum R), c.Chain' (· < ·) ∧ (∀ 𝔮 ∈ c, 𝔮 < 𝔭) ∧ c.length = n + 1 := by
|
|
|
|
|
rcases n with _ | n
|
|
|
|
|
. constructor <;> intro h <;> exfalso
|
|
|
|
|
. exact (not_le.mpr h) le_top
|
|
|
|
|
. -- change ∃c, _ ∧ _ ∧ ((List.length c : ℕ∞) = ⊤ + 1) at h
|
|
|
|
|
-- rw [WithTop.top_add] at h
|
|
|
|
|
tauto
|
|
|
|
|
have (m : ℕ∞) : m > some n ↔ m ≥ some (n + 1) := by
|
|
|
|
|
symm
|
|
|
|
|
show (n + 1 ≤ m ↔ _ )
|
|
|
|
|
apply ENat.add_one_le_iff
|
|
|
|
|
exact ENat.coe_ne_top _
|
|
|
|
|
rw [this]
|
|
|
|
|
unfold Ideal.height
|
|
|
|
|
show ((↑(n + 1):ℕ∞) ≤ _) ↔ ∃c, _ ∧ _ ∧ ((_ : WithTop ℕ) = (_:ℕ∞))
|
|
|
|
|
rw [{J | J < 𝔭}.le_chainHeight_iff]
|
|
|
|
|
show (∃ c, (List.Chain' _ c ∧ ∀𝔮, 𝔮 ∈ c → 𝔮 < 𝔭) ∧ _) ↔ _
|
|
|
|
|
have h := fun (c : List (PrimeSpectrum R)) => (@WithTop.coe_eq_coe _ (List.length c) n)
|
|
|
|
|
constructor <;> rintro ⟨c, hc⟩ <;> use c --<;> tauto--<;> exact ⟨hc.1, by tauto⟩
|
|
|
|
|
. --rw [and_assoc]
|
|
|
|
|
-- show _ ∧ _ ∧ _
|
|
|
|
|
--exact ⟨hc.1, _⟩
|
|
|
|
|
tauto
|
|
|
|
|
. change _ ∧ _ ∧ (List.length c : ℕ∞) = n + 1 at hc
|
|
|
|
|
norm_cast at hc
|
|
|
|
|
tauto
|
|
|
|
|
|
|
|
|
|
lemma krullDim_le_iff' (R : Type _) [CommRing R] {n : WithBot ℕ∞} :
|
2023-06-12 13:02:03 -05:00
|
|
|
|
Ideal.krullDim R ≤ n ↔ (∀ c : List (PrimeSpectrum R), c.Chain' (· < ·) → c.length ≤ n + 1) := by
|
|
|
|
|
sorry
|
|
|
|
|
|
2023-06-12 23:23:17 -05:00
|
|
|
|
lemma krullDim_ge_iff' (R : Type _) [CommRing R] {n : WithBot ℕ∞} :
|
2023-06-12 13:02:03 -05:00
|
|
|
|
Ideal.krullDim R ≥ n ↔ ∃ c : List (PrimeSpectrum R), c.Chain' (· < ·) ∧ c.length = n + 1 := sorry
|
2023-06-11 23:02:16 -05:00
|
|
|
|
|
2023-06-12 23:23:17 -05:00
|
|
|
|
#check (sorry : False)
|
|
|
|
|
#check (sorryAx)
|
|
|
|
|
#check (4 : WithBot ℕ∞)
|
|
|
|
|
#check List.sum
|
2023-06-11 23:02:16 -05:00
|
|
|
|
-- #check ((4 : ℕ∞) : WithBot (WithTop ℕ))
|
2023-06-12 23:23:17 -05:00
|
|
|
|
-- #check ( (Set.chainHeight s) : WithBot (ℕ∞))
|
|
|
|
|
|
|
|
|
|
variable (P : PrimeSpectrum R)
|
|
|
|
|
|
|
|
|
|
#check {J | J < P}.le_chainHeight_iff (n := 4)
|