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

Commit c4268a8

Browse files
committed
feat(topology,analysis): there exists y ∈ frontier s at distance inf_dist x sᶜ from x (#10976)
1 parent 5dac1c0 commit c4268a8

File tree

2 files changed

+85
-10
lines changed

2 files changed

+85
-10
lines changed

src/analysis/normed_space/finite_dimension.lean

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,11 +612,24 @@ end proper_field
612612

613613
/- Over the real numbers, we can register the previous statement as an instance as it will not
614614
cause problems in instance resolution since the properness of `ℝ` is already known. -/
615+
@[priority 900]
615616
instance finite_dimensional.proper_real
616617
(E : Type u) [normed_group E] [normed_space ℝ E] [finite_dimensional ℝ E] : proper_space E :=
617618
finite_dimensional.proper ℝ E
618619

619-
attribute [instance, priority 900] finite_dimensional.proper_real
620+
/-- If `E` is a finite dimensional normed real vector space, `x : E`, and `s` is a neighborhood of
621+
`x` that is not equal to the whole space, then there exists a point `y ∈ frontier s` at distance
622+
`metric.inf_dist x sᶜ` from `x`. -/
623+
lemma exists_mem_frontier_inf_dist_compl_eq_dist {E : Type*} [normed_group E]
624+
[normed_space ℝ E] [finite_dimensional ℝ E] {x : E} {s : set E} (hx : x ∈ s) (hs : s ≠ univ) :
625+
∃ y ∈ frontier s, metric.inf_dist x sᶜ = dist x y :=
626+
begin
627+
rcases metric.exists_mem_closure_inf_dist_eq_dist (nonempty_compl.2 hs) x with ⟨y, hys, hyd⟩,
628+
rw closure_compl at hys,
629+
refine ⟨y, ⟨metric.closed_ball_inf_dist_compl_subset_closure hx hs $
630+
metric.mem_closed_ball.2 $ ge_of_eq _, hys⟩, hyd⟩,
631+
rwa dist_comm
632+
end
620633

621634
/-- In a finite dimensional vector space over `ℝ`, the series `∑ x, ∥f x∥` is unconditionally
622635
summable if and only if the series `∑ x, f x` is unconditionally summable. One implication holds in

src/topology/metric_space/hausdorff_distance.lean

Lines changed: 71 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ begin
163163
exact ⟨n, hn.le⟩ },
164164
end
165165

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 : α) :
167167
∃ y ∈ s, inf_edist x s = edist x y :=
168168
begin
169169
have A : continuous (λ y, edist x y) := continuous_const.edist continuous_id,
@@ -454,16 +454,17 @@ begin
454454
{ simp [ennreal.add_eq_top, inf_edist_ne_top hs, edist_ne_top] }}
455455
end
456456

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+
457465
lemma disjoint_closed_ball_of_lt_inf_dist {r : ℝ} (h : r < inf_dist x s) :
458466
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
467468

468469
variable (s)
469470

@@ -513,6 +514,67 @@ lemma inf_dist_image (hΦ : isometry Φ) :
513514
inf_dist (Φ x) (Φ '' t) = inf_dist x t :=
514515
by simp [inf_dist, inf_edist_image hΦ]
515516

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.1with ⟨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+
516578
/-! ### Distance of a point to a set as a function into `ℝ≥0`. -/
517579

518580
/-- The minimal distance of a point to a set as a `ℝ≥0` -/

0 commit comments

Comments
 (0)