Little bit of golfing

This commit is contained in:
Sayantan Santra 2023-06-13 19:55:50 -07:00
parent 4080cec961
commit 23064c442b
Signed by: SinTan1729
GPG key ID: EB3E68BFBA25C85F

View file

@ -130,8 +130,6 @@ lemma dim_field_eq_zero {K : Type _} [Field K] : krullDim K = 0 := by
simp [field_prime_height_zero] simp [field_prime_height_zero]
lemma isField.dim_zero {D: Type _} [CommRing D] [IsDomain D] (h: krullDim D = 0) : IsField D := by lemma isField.dim_zero {D: Type _} [CommRing D] [IsDomain D] (h: krullDim D = 0) : IsField D := by
unfold krullDim at h
simp [height] at h
by_contra x by_contra x
rw [Ring.not_isField_iff_exists_prime] at x rw [Ring.not_isField_iff_exists_prime] at x
obtain ⟨P, ⟨h1, primeP⟩⟩ := x obtain ⟨P, ⟨h1, primeP⟩⟩ := x
@ -140,16 +138,16 @@ lemma isField.dim_zero {D: Type _} [CommRing D] [IsDomain D] (h: krullDim D = 0)
by_contra a by_contra a
have : P = ⊥ := by rwa [PrimeSpectrum.ext_iff] at a have : P = ⊥ := by rwa [PrimeSpectrum.ext_iff] at a
contradiction contradiction
have PgtBot : P' > ⊥ := Ne.bot_lt h2 have pos_height : ¬ (height P') ≤ 0 := by
have pos_height : ¬ ↑(Set.chainHeight {J | J < P'}) ≤ 0 := by have : ⊥ ∈ {J | J < P'} := Ne.bot_lt h2
have : ⊥ ∈ {J | J < P'} := PgtBot
have : {J | J < P'}.Nonempty := Set.nonempty_of_mem this have : {J | J < P'}.Nonempty := Set.nonempty_of_mem this
unfold height
rw [←Set.one_le_chainHeight_iff] at this rw [←Set.one_le_chainHeight_iff] at this
exact not_le_of_gt (Iff.mp ENat.one_le_iff_pos this) exact not_le_of_gt (Iff.mp ENat.one_le_iff_pos this)
have nonpos_height : (Set.chainHeight {J | J < P'}) ≤ 0 := by have nonpos_height : height P' ≤ 0 := by
have : (⨆ (I : PrimeSpectrum D), (Set.chainHeight {J | J < I} : WithBot ℕ∞)) ≤ 0 := h.le have := height_le_krullDim P'
rw [iSup_le_iff] at this rw [h] at this
exact Iff.mp WithBot.coe_le_zero (this P') aesop
contradiction contradiction
lemma dim_eq_zero_iff_field {D: Type _} [CommRing D] [IsDomain D] : krullDim D = 0 ↔ IsField D := by lemma dim_eq_zero_iff_field {D: Type _} [CommRing D] [IsDomain D] : krullDim D = 0 ↔ IsField D := by
@ -167,10 +165,10 @@ lemma dim_le_one_of_pid [IsDomain R] [IsPrincipalIdealRing R] : krullDim R ≤ 1
exact Ring.DimensionLEOne.principal_ideal_ring R exact Ring.DimensionLEOne.principal_ideal_ring R
lemma dim_le_dim_polynomial_add_one [Nontrivial R] : lemma dim_le_dim_polynomial_add_one [Nontrivial R] :
krullDim R ≤ krullDim (Polynomial R) + 1 := sorry krullDim R + 1 ≤ krullDim (Polynomial R) := sorry
lemma dim_eq_dim_polynomial_add_one [Nontrivial R] [IsNoetherianRing R] : lemma dim_eq_dim_polynomial_add_one [Nontrivial R] [IsNoetherianRing R] :
krullDim R = krullDim (Polynomial R) + 1 := sorry krullDim R + 1 = krullDim (Polynomial R) := sorry
lemma height_eq_dim_localization : lemma height_eq_dim_localization :
height I = krullDim (Localization.AtPrime I.asIdeal) := sorry height I = krullDim (Localization.AtPrime I.asIdeal) := sorry