Skip to content

Commit

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

lemma krullDim_eq_iSup_height_of_nonempty [Nonempty α] : krullDim α = ⨆ (a : α), height a := by
rw [krullDim_eq_iSup_height, WithBot.coe_iSup_OrderTop]

@[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]
Expand Down Expand Up @@ -656,15 +659,33 @@ lemma height_coe_WithTop (x : α) : height (x : WithTop α) = height x := by
· apply height_le
intro p hlast
let p' := p.map _ WithTop.coe_strictMono
apply le_iSup_of_le ⟨p', by simp [p', hlast]⟩
simp [p']
apply le_iSup_of_le ⟨p', by simp [p', hlast]⟩ (by simp [p'])

@[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
rw [← height_top_eq_krullDim]
rw [krullDim_eq_iSup_height_of_nonempty]
norm_cast
rw [ENat.iSup_add]
rw [height_eq_isup_lt_height]
apply le_antisymm
· apply iSup_le
intro x
apply iSup_le
intro h
cases x with
| top => simp at h
| coe x =>
simp only [height_coe_WithTop]
exact le_iSup_of_le x (le_refl _)
· apply iSup_le
intro x
apply le_iSup_of_le (↑x)
apply le_iSup_of_le (WithTop.coe_lt_top x)
simp only [height_coe_WithTop, le_refl]

@[simp]
lemma height_ENat (n : ℕ∞) : height n = n := by
Expand Down

0 comments on commit 5b9a736

Please sign in to comment.