Skip to content

Commit

Permalink
Towards height_ENat
Browse files Browse the repository at this point in the history
  • Loading branch information
nomeata committed Aug 2, 2024
1 parent 19b26ca commit 41d2c59
Showing 1 changed file with 32 additions and 3 deletions.
35 changes: 32 additions & 3 deletions Carleson/ToMathlib/Height.lean
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ lemma krullDim_eq_iSup_height : krullDim α = ⨆ (a : α), (height a : WithBot
intro x
exact height_le _ _ (fun p _ ↦ le_iSup_of_le p (le_refl _))

@[simp]
@[simp] -- not as useful as it looks, due to the coe on the left
lemma height_top_eq_krullDim [OrderTop α] : height (⊤ : α) = krullDim α := by
rw [krullDim_eq_of_nonempty]
simp only [WithBot.coe_inj]
Expand All @@ -545,6 +545,21 @@ lemma height_top_eq_krullDim [OrderTop α] : height (⊤ : α) = krullDim α :=
· let p' : LTSeries ℕ := { length := n, toFun := fun i => i, step := fun i => by simp }
apply length_le_height_last p'

@[simp]
lemma krullDim_nat : krullDim ℕ = ⊤ := by
simp only [krullDim_eq_iSup_height, height_nat]
rw [← WithBot.coe_iSup_OrderTop]
simp only [WithBot.coe_eq_top]
show (⨆ (i : ℕ), ↑i = (⊤ : ℕ∞)) -- nothing simpler form here on?
rw [iSup_eq_top]
intro n hn
cases n with
| top => contradiction
| coe n =>
use (n+1)
norm_cast
simp

@[simp] lemma height_int (a : ℤ) : height a = ⊤ := by
rw [height_eq_top_iff]
intro n
Expand Down Expand Up @@ -644,5 +659,19 @@ lemma height_coe_WithTop (x : α) : height (x : WithTop α) = height x := by
apply le_iSup_of_le ⟨p', by simp [p', hlast]⟩
simp [p']

-- TODO: For height_top_WithTop we need the krull dimension
-- Then we can show that height is the identity on ℕ∞
@[simp]
lemma height_coe_ENat (x : ℕ) : height (x : ℕ∞) = height x := height_coe_WithTop x

@[simp]
lemma krullDim_WithTop [Nonempty α] : krullDim (WithTop α) = krullDim α + 1 := by
sorry

@[simp]
lemma height_ENat (n : ℕ∞) : height n = n := by
cases n with
| top =>
rw [← WithBot.coe_eq_coe, height_top_eq_krullDim]
show (krullDim (WithTop ℕ) = ↑⊤)
simp only [krullDim_WithTop, krullDim_nat]
rfl
| coe n => simp

0 comments on commit 41d2c59

Please sign in to comment.