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

Commit

Permalink
chore(topology/metric_space): export is_compact_closed_ball (#10973)
Browse files Browse the repository at this point in the history
  • Loading branch information
urkud committed Dec 24, 2021
1 parent 36ba1ac commit 1a780f6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/analysis/inner_product_space/euclidean_dist.lean
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ by rw [to_euclidean.image_symm_eq_preimage, closed_ball_eq_preimage]
lemma is_compact_closed_ball {x : E} {r : ℝ} : is_compact (closed_ball x r) :=
begin
rw closed_ball_eq_image,
exact (proper_space.is_compact_closed_ball _ _).image to_euclidean.symm.continuous
exact (is_compact_closed_ball _ _).image to_euclidean.symm.continuous
end

lemma is_closed_closed_ball {x : E} {r : ℝ} : is_closed (closed_ball x r) :=
Expand Down
2 changes: 1 addition & 1 deletion src/geometry/manifold/bump_function.lean
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ lemma nonempty_support : (support f).nonempty := ⟨c, f.c_mem_support⟩

lemma compact_symm_image_closed_ball :
is_compact ((ext_chart_at I c).symm '' (closed_ball (ext_chart_at I c c) f.R ∩ range I)) :=
(is_compact_closed_ball.inter_right I.closed_range).image_of_continuous_on $
(euclidean.is_compact_closed_ball.inter_right I.closed_range).image_of_continuous_on $
(ext_chart_at_continuous_on_symm _ _).mono f.closed_ball_subset

/-- Given a smooth bump function `f : smooth_bump_function I c`, the closed ball of radius `f.R` is
Expand Down
2 changes: 1 addition & 1 deletion src/measure_theory/covering/besicovitch_vector_space.lean
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ begin
(hF (u n) (zero_lt_u n)).left, forall_const], },
obtain ⟨f, fmem, φ, φ_mono, hf⟩ : ∃ (f ∈ closed_ball (0 : fin N → E) 2) (φ : ℕ → ℕ),
strict_mono φ ∧ tendsto ((F ∘ u) ∘ φ) at_top (𝓝 f) :=
is_compact.tendsto_subseq (proper_space.is_compact_closed_ball _ _) A,
is_compact.tendsto_subseq (is_compact_closed_ball _ _) A,
refine ⟨f, λ i, _, λ i j hij, _⟩,
{ simp only [pi_norm_le_iff zero_le_two, mem_closed_ball, dist_zero_right] at fmem,
exact fmem i },
Expand Down
19 changes: 9 additions & 10 deletions src/topology/metric_space/basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1505,11 +1505,12 @@ open metric
class proper_space (α : Type u) [pseudo_metric_space α] : Prop :=
(is_compact_closed_ball : ∀x:α, ∀r, is_compact (closed_ball x r))

export proper_space (is_compact_closed_ball)

/-- In a proper pseudometric space, all spheres are compact. -/
lemma is_compact_sphere {α : Type*} [pseudo_metric_space α] [proper_space α] (x : α) (r : ℝ) :
is_compact (sphere x r) :=
compact_of_is_closed_subset (proper_space.is_compact_closed_ball x r) is_closed_sphere
sphere_subset_closed_ball
compact_of_is_closed_subset (is_compact_closed_ball x r) is_closed_sphere sphere_subset_closed_ball

/-- In a proper pseudometric space, any sphere is a `compact_space` when considered as a subtype. -/
instance {α : Type*} [pseudo_metric_space α] [proper_space α] (x : α) (r : ℝ) :
Expand All @@ -1525,16 +1526,14 @@ begin
-- add an instance for `sigma_compact_space`.
suffices : sigma_compact_space α, by exactI emetric.second_countable_of_sigma_compact α,
rcases em (nonempty α) with ⟨⟨x⟩⟩|hn,
{ exact ⟨⟨λ n, closed_ball x n, λ n, proper_space.is_compact_closed_ball _ _,
Union_closed_ball_nat _⟩⟩ },
{ exact ⟨⟨λ n, closed_ball x n, λ n, is_compact_closed_ball _ _, Union_closed_ball_nat _⟩⟩ },
{ exact ⟨⟨λ n, ∅, λ n, is_compact_empty, Union_eq_univ_iff.2 $ λ x, (hn ⟨x⟩).elim⟩⟩ }
end

lemma tendsto_dist_right_cocompact_at_top [proper_space α] (x : α) :
tendsto (λ y, dist y x) (cocompact α) at_top :=
(has_basis_cocompact.tendsto_iff at_top_basis).2 $ λ r hr,
⟨closed_ball x r, proper_space.is_compact_closed_ball x r,
λ y hy, (not_le.1 $ mt mem_closed_ball.2 hy).le⟩
⟨closed_ball x r, is_compact_closed_ball x r, λ y hy, (not_le.1 $ mt mem_closed_ball.2 hy).le⟩

lemma tendsto_dist_left_cocompact_at_top [proper_space α] (x : α) :
tendsto (dist x) (cocompact α) at_top :=
Expand Down Expand Up @@ -1567,7 +1566,7 @@ instance proper_of_compact [compact_space α] : proper_space α :=
instance locally_compact_of_proper [proper_space α] :
locally_compact_space α :=
locally_compact_space_of_has_basis (λ x, nhds_basis_closed_ball) $
λ x ε ε0, proper_space.is_compact_closed_ball _ _
λ x ε ε0, is_compact_closed_ball _ _

/-- A proper space is complete -/
@[priority 100] -- see Note [lower instance priority]
Expand All @@ -1580,7 +1579,7 @@ instance complete_of_proper [proper_space α] : complete_space α :=
(metric.cauchy_iff.1 hf).2 1 zero_lt_one,
rcases hf.1.nonempty_of_mem t_fset with ⟨x, xt⟩,
have : closed_ball x 1 ∈ f := mem_of_superset t_fset (λ y yt, (ht y x yt xt).le),
rcases (compact_iff_totally_bounded_complete.1 (proper_space.is_compact_closed_ball x 1)).2 f hf
rcases (compact_iff_totally_bounded_complete.1 (is_compact_closed_ball x 1)).2 f hf
(le_principal_iff.2 this) with ⟨y, -, hy⟩,
exact ⟨y, hy⟩
end
Expand All @@ -1605,7 +1604,7 @@ begin
unfreezingI { rcases eq_empty_or_nonempty s with rfl|hne },
{ exact ⟨r / 2, ⟨half_pos hr, half_lt_self hr⟩, empty_subset _⟩ },
have : is_compact s,
from compact_of_is_closed_subset (proper_space.is_compact_closed_ball x r) hs
from compact_of_is_closed_subset (is_compact_closed_ball x r) hs
(subset.trans h ball_subset_closed_ball),
obtain ⟨y, hys, hy⟩ : ∃ y ∈ s, s ⊆ closed_ball x (dist y x),
from this.exists_forall_ge hne (continuous_id.dist continuous_const).continuous_on,
Expand Down Expand Up @@ -1827,7 +1826,7 @@ begin
unfreezingI { rcases eq_empty_or_nonempty s with (rfl|⟨x, hx⟩) },
{ exact is_compact_empty },
{ rcases hb.subset_ball x with ⟨r, hr⟩,
exact compact_of_is_closed_subset (proper_space.is_compact_closed_ball x r) hc hr }
exact compact_of_is_closed_subset (is_compact_closed_ball x r) hc hr }
end

/-- The Heine–Borel theorem:
Expand Down

0 comments on commit 1a780f6

Please sign in to comment.