Skip to content

Commit

Permalink
feat(topology/instances/ennreal): diameter of intervals (#16556)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgouezel committed Sep 19, 2022
1 parent 3f498b0 commit d742555
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/topology/instances/ennreal.lean
Expand Up @@ -1361,7 +1361,7 @@ is_closed_le (continuous_id.edist continuous_const) continuous_const
begin
refine le_antisymm (diam_le $ λ x hx y hy, _) (diam_mono subset_closure),
have : edist x y ∈ closure (Iic (diam s)),
from map_mem_closure₂ continuous_edist hx hy (λ x hx y hy, edist_le_diam_of_mem hx hy),
from map_mem_closure₂ continuous_edist hx hy (λ x hx y hy, edist_le_diam_of_mem hx hy),
rwa closure_Iic at this
end

Expand Down Expand Up @@ -1436,6 +1436,18 @@ le_antisymm (ediam_Icc a b ▸ diam_mono Ico_subset_Icc_self)
le_antisymm (ediam_Icc a b ▸ diam_mono Ioc_subset_Icc_self)
(ediam_Ioo a b ▸ diam_mono Ioo_subset_Ioc_self)

lemma diam_Icc {a b : ℝ} (h : a ≤ b) : metric.diam (Icc a b) = b - a :=
by simp [metric.diam, ennreal.to_real_of_real, sub_nonneg.2 h]

lemma diam_Ico {a b : ℝ} (h : a ≤ b) : metric.diam (Ico a b) = b - a :=
by simp [metric.diam, ennreal.to_real_of_real, sub_nonneg.2 h]

lemma diam_Ioc {a b : ℝ} (h : a ≤ b) : metric.diam (Ioc a b) = b - a :=
by simp [metric.diam, ennreal.to_real_of_real, sub_nonneg.2 h]

lemma diam_Ioo {a b : ℝ} (h : a ≤ b) : metric.diam (Ioo a b) = b - a :=
by simp [metric.diam, ennreal.to_real_of_real, sub_nonneg.2 h]

end real

/-- If `edist (f n) (f (n+1))` is bounded above by a function `d : ℕ → ℝ≥0∞`,
Expand Down

0 comments on commit d742555

Please sign in to comment.