@@ -163,7 +163,7 @@ begin
163
163
exact ⟨n, hn.le⟩ },
164
164
end
165
165
166
- lemma _root_.is_compact.exists_inf_edist_eq_edist (hs : is_compact s) (hne : s.nonempty) :
166
+ lemma _root_.is_compact.exists_inf_edist_eq_edist (hs : is_compact s) (hne : s.nonempty) (x : α) :
167
167
∃ y ∈ s, inf_edist x s = edist x y :=
168
168
begin
169
169
have A : continuous (λ y, edist x y) := continuous_const.edist continuous_id,
@@ -454,16 +454,17 @@ begin
454
454
{ simp [ennreal.add_eq_top, inf_edist_ne_top hs, edist_ne_top] }}
455
455
end
456
456
457
+ lemma not_mem_of_dist_lt_inf_dist (h : dist x y < inf_dist x s) : y ∉ s :=
458
+ λ hy, h.not_le $ inf_dist_le_dist_of_mem hy
459
+
460
+ lemma disjoint_ball_inf_dist : disjoint (ball x (inf_dist x s)) s :=
461
+ disjoint_left.2 $ λ y hy, not_mem_of_dist_lt_inf_dist $
462
+ calc dist x y = dist y x : dist_comm _ _
463
+ ... < inf_dist x s : hy
464
+
457
465
lemma disjoint_closed_ball_of_lt_inf_dist {r : ℝ} (h : r < inf_dist x s) :
458
466
disjoint (closed_ball x r) s :=
459
- begin
460
- rw disjoint_left,
461
- assume y hy h'y,
462
- apply lt_irrefl (inf_dist x s),
463
- calc inf_dist x s ≤ dist x y : inf_dist_le_dist_of_mem h'y
464
- ... ≤ r : by rwa [mem_closed_ball, dist_comm] at hy
465
- ... < inf_dist x s : h
466
- end
467
+ disjoint_ball_inf_dist.mono_left $ closed_ball_subset_ball h
467
468
468
469
variable (s)
469
470
@@ -513,6 +514,67 @@ lemma inf_dist_image (hΦ : isometry Φ) :
513
514
inf_dist (Φ x) (Φ '' t) = inf_dist x t :=
514
515
by simp [inf_dist, inf_edist_image hΦ]
515
516
517
+ lemma inf_dist_inter_closed_ball_of_mem (h : y ∈ s) :
518
+ inf_dist x (s ∩ closed_ball x (dist y x)) = inf_dist x s :=
519
+ begin
520
+ replace h : y ∈ s ∩ closed_ball x (dist y x) := ⟨h, mem_closed_ball.2 le_rfl⟩,
521
+ refine le_antisymm _ (inf_dist_le_inf_dist_of_subset (inter_subset_left _ _) ⟨y, h⟩),
522
+ refine not_lt.1 (λ hlt, _),
523
+ rcases exists_dist_lt_of_inf_dist_lt hlt ⟨y, h.1 ⟩ with ⟨z, hzs, hz⟩,
524
+ cases le_or_lt (dist z x) (dist y x) with hle hlt,
525
+ { exact hz.not_le (inf_dist_le_dist_of_mem ⟨hzs, hle⟩) },
526
+ { rw [dist_comm z, dist_comm y] at hlt,
527
+ exact (hlt.trans hz).not_le (inf_dist_le_dist_of_mem h) }
528
+ end
529
+
530
+ lemma _root_.is_compact.exists_inf_dist_eq_dist (h : is_compact s) (hne : s.nonempty) (x : α) :
531
+ ∃ y ∈ s, inf_dist x s = dist x y :=
532
+ let ⟨y, hys, hy⟩ := h.exists_inf_edist_eq_edist hne x
533
+ in ⟨y, hys, by rw [inf_dist, dist_edist, hy]⟩
534
+
535
+ lemma _root_.is_closed.exists_inf_dist_eq_dist [proper_space α]
536
+ (h : is_closed s) (hne : s.nonempty) (x : α) :
537
+ ∃ y ∈ s, inf_dist x s = dist x y :=
538
+ begin
539
+ rcases hne with ⟨z, hz⟩,
540
+ rw ← inf_dist_inter_closed_ball_of_mem hz,
541
+ set t := s ∩ closed_ball x (dist z x),
542
+ have htc : is_compact t := (is_compact_closed_ball x (dist z x)).inter_left h,
543
+ have htne : t.nonempty := ⟨z, hz, mem_closed_ball.2 le_rfl⟩,
544
+ obtain ⟨y, ⟨hys, hyx⟩, hyd⟩ : ∃ y ∈ t, inf_dist x t = dist x y,
545
+ from htc.exists_inf_dist_eq_dist htne x,
546
+ exact ⟨y, hys, hyd⟩
547
+ end
548
+
549
+ lemma exists_mem_closure_inf_dist_eq_dist [proper_space α] (hne : s.nonempty) (x : α) :
550
+ ∃ y ∈ closure s, inf_dist x s = dist x y :=
551
+ by simpa only [inf_dist_eq_closure] using is_closed_closure.exists_inf_dist_eq_dist hne.closure x
552
+
553
+ lemma closed_ball_inf_dist_compl_subset_closure' {E : Type *} [semi_normed_group E]
554
+ [semi_normed_space ℝ E] {x : E} {s : set E} (hx : s ∈ 𝓝 x) (hs : s ≠ univ) :
555
+ closed_ball x (inf_dist x sᶜ) ⊆ closure s :=
556
+ begin
557
+ have hne : sᶜ.nonempty, from nonempty_compl.2 hs,
558
+ have hpos : 0 < inf_dist x sᶜ,
559
+ by rwa [← inf_dist_eq_closure, ← is_closed_closure.not_mem_iff_inf_dist_pos hne.closure,
560
+ closure_compl, mem_compl_iff, not_not, mem_interior_iff_mem_nhds],
561
+ rw ← closure_ball x hpos,
562
+ apply closure_mono,
563
+ rw [← le_eq_subset, ← is_compl_compl.disjoint_right_iff],
564
+ exact disjoint_ball_inf_dist
565
+ end
566
+
567
+ lemma closed_ball_inf_dist_compl_subset_closure {E : Type *} [normed_group E] [normed_space ℝ E]
568
+ {x : E} {s : set E} (hx : x ∈ s) (hs : s ≠ univ) :
569
+ closed_ball x (inf_dist x sᶜ) ⊆ closure s :=
570
+ begin
571
+ by_cases hx' : x ∈ closure sᶜ,
572
+ { rw [mem_closure_iff_inf_dist_zero (nonempty_compl.2 hs)] at hx',
573
+ simpa [hx'] using subset_closure hx },
574
+ { rw [closure_compl, mem_compl_iff, not_not, mem_interior_iff_mem_nhds] at hx',
575
+ exact closed_ball_inf_dist_compl_subset_closure' hx' hs }
576
+ end
577
+
516
578
/-! ### Distance of a point to a set as a function into `ℝ≥0`. -/
517
579
518
580
/-- The minimal distance of a point to a set as a `ℝ≥0` -/
0 commit comments