Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 1c60e61

Browse files
committed
feat(topology/metric_space/basic): emetric.ball x ∞ = univ (#8745)
* add `@[simp]` to `metric.emetric_ball`, `metric.emetric_ball_nnreal`, and `metric.emetric_closed_ball_nnreal`; * add `@[simp]` lemmas `metric.emetric_ball_top` and `emetric.closed_ball_top`.
1 parent 0e0a240 commit 1c60e61

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/topology/metric_space/basic.lean

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -763,15 +763,15 @@ instance pseudo_metric_space.to_pseudo_emetric_space : pseudo_emetric_space α :
763763
..‹pseudo_metric_space α› }
764764

765765
/-- Balls defined using the distance or the edistance coincide -/
766-
lemma metric.emetric_ball {x : α} {ε : ℝ} : emetric.ball x (ennreal.of_real ε) = ball x ε :=
766+
@[simp] lemma metric.emetric_ball {x : α} {ε : ℝ} : emetric.ball x (ennreal.of_real ε) = ball x ε :=
767767
begin
768768
ext y,
769769
simp only [emetric.mem_ball, mem_ball, edist_dist],
770770
exact ennreal.of_real_lt_of_real_iff_of_nonneg dist_nonneg
771771
end
772772

773773
/-- Balls defined using the distance or the edistance coincide -/
774-
lemma metric.emetric_ball_nnreal {x : α} {ε : ℝ≥0} : emetric.ball x ε = ball x ε :=
774+
@[simp] lemma metric.emetric_ball_nnreal {x : α} {ε : ℝ≥0} : emetric.ball x ε = ball x ε :=
775775
by { convert metric.emetric_ball, simp }
776776

777777
/-- Closed balls defined using the distance or the edistance coincide -/
@@ -780,10 +780,13 @@ lemma metric.emetric_closed_ball {x : α} {ε : ℝ} (h : 0 ≤ ε) :
780780
by ext y; simp [edist_dist]; rw ennreal.of_real_le_of_real_iff h
781781

782782
/-- Closed balls defined using the distance or the edistance coincide -/
783-
lemma metric.emetric_closed_ball_nnreal {x : α} {ε : ℝ≥0} :
783+
@[simp] lemma metric.emetric_closed_ball_nnreal {x : α} {ε : ℝ≥0} :
784784
emetric.closed_ball x ε = closed_ball x ε :=
785785
by { convert metric.emetric_closed_ball ε.2, simp }
786786

787+
@[simp] lemma metric.emetric_ball_top (x : α) : emetric.ball x ⊤ = univ :=
788+
eq_univ_of_forall $ λ y, edist_lt_top _ _
789+
787790
/-- Build a new pseudometric space from an old one where the bundled uniform structure is provably
788791
(but typically non-definitionaly) equal to some given uniform structure.
789792
See Note [forgetful inheritance].

src/topology/metric_space/emetric_space.lean

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,11 @@ def closed_ball (x : α) (ε : ℝ≥0∞) := {y | edist y x ≤ ε}
482482

483483
@[simp] theorem mem_closed_ball : y ∈ closed_ball x ε ↔ edist y x ≤ ε := iff.rfl
484484

485+
@[simp] theorem closed_ball_top (x : α) : closed_ball x ∞ = univ :=
486+
eq_univ_of_forall $ λ y, @le_top _ _ (edist y x)
487+
485488
theorem ball_subset_closed_ball : ball x ε ⊆ closed_ball x ε :=
486-
assume y, by simp; intros h; apply le_of_lt h
489+
assume y hy, le_of_lt hy
487490

488491
theorem pos_of_mem_ball (hy : y ∈ ball x ε) : 0 < ε :=
489492
lt_of_le_of_lt (zero_le _) hy

0 commit comments

Comments
 (0)