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

Commit 7592a8f

Browse files
committed
chore(analysis/normed_space/finite_dimension,topology/metric_space): golf (#6285)
* golf two proofs about `finite_dimension`; * move `proper_image_of_proper` to `antilipschitz`, rename to `antilipschitz_with.proper_space`, golf.
1 parent bc1c4f2 commit 7592a8f

File tree

3 files changed

+32
-44
lines changed

3 files changed

+32
-44
lines changed

src/analysis/normed_space/finite_dimension.lean

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -345,12 +345,8 @@ explicitly when needed. -/
345345
variables (𝕜 E)
346346
lemma finite_dimensional.complete [finite_dimensional 𝕜 E] : complete_space E :=
347347
begin
348-
rcases exists_is_basis_finite 𝕜 E with ⟨b, b_basis, b_finite⟩,
349-
letI : fintype b := finite.fintype b_finite,
350-
have : uniform_embedding b_basis.equiv_fun.symm :=
351-
linear_equiv.uniform_embedding _ (linear_map.continuous_of_finite_dimensional _)
352-
(linear_map.continuous_of_finite_dimensional _),
353-
change uniform_embedding b_basis.equiv_fun.symm.to_equiv at this,
348+
set e := continuous_linear_equiv.of_findim_eq (@findim_fin_fun 𝕜 _ (findim 𝕜 E)).symm,
349+
have : uniform_embedding e.to_linear_equiv.to_equiv.symm := e.symm.uniform_embedding,
354350
exact (complete_space_congr this).1 (by apply_instance)
355351
end
356352

@@ -403,19 +399,8 @@ properness of `𝕜`, and the search for `𝕜` as an unknown metavariable. Decl
403399
explicitly when needed. -/
404400
lemma finite_dimensional.proper [finite_dimensional 𝕜 E] : proper_space E :=
405401
begin
406-
rcases exists_is_basis_finite 𝕜 E with ⟨b, b_basis, b_finite⟩,
407-
letI : fintype b := finite.fintype b_finite,
408-
let e := b_basis.equiv_fun,
409-
let f : E →L[𝕜] (b → 𝕜) :=
410-
{ cont := linear_map.continuous_of_finite_dimensional _, ..e.to_linear_map },
411-
refine metric.proper_image_of_proper e.symm
412-
(linear_map.continuous_of_finite_dimensional _) _ (∥f∥) (λx y, _),
413-
{ exact equiv.range_eq_univ e.symm.to_equiv },
414-
{ have A : e (e.symm x) = x := linear_equiv.apply_symm_apply _ _,
415-
have B : e (e.symm y) = y := linear_equiv.apply_symm_apply _ _,
416-
conv_lhs { rw [← A, ← B] },
417-
change dist (f (e.symm x)) (f (e.symm y)) ≤ ∥f∥ * dist (e.symm x) (e.symm y),
418-
unfreezingI { exact f.lipschitz.dist_le_mul _ _ } }
402+
set e := continuous_linear_equiv.of_findim_eq (@findim_fin_fun 𝕜 _ (findim 𝕜 E)).symm,
403+
exact e.symm.antilipschitz.proper_space e.symm.continuous e.symm.surjective
419404
end
420405

421406
end proper_field

src/topology/metric_space/antilipschitz.lean

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,34 @@ lemma of_subsingleton [subsingleton α] {K : ℝ≥0} : antilipschitz_with K f :
129129

130130
end antilipschitz_with
131131

132+
namespace antilipschitz_with
133+
134+
open metric
135+
136+
variables [metric_space α] [metric_space β] {K : ℝ≥0} {f : α → β}
137+
138+
lemma bounded_preimage (hf : antilipschitz_with K f)
139+
{s : set β} (hs : bounded s) :
140+
bounded (f ⁻¹' s) :=
141+
exists.intro (K * diam s) $ λ x y hx hy,
142+
calc dist x y ≤ K * dist (f x) (f y) : hf.le_mul_dist x y
143+
... ≤ K * diam s : mul_le_mul_of_nonneg_left (dist_le_diam_of_mem hs hx hy) K.2
144+
145+
/-- The image of a proper space under an expanding onto map is proper. -/
146+
protected lemma proper_space [proper_space α] (hK : antilipschitz_with K f) (f_cont : continuous f)
147+
(hf : function.surjective f) : proper_space β :=
148+
begin
149+
apply proper_space_of_compact_closed_ball_of_le 0 (λx₀ r hr, _),
150+
let K := f ⁻¹' (closed_ball x₀ r),
151+
have A : is_closed K := is_closed_ball.preimage f_cont,
152+
have B : bounded K := hK.bounded_preimage bounded_closed_ball,
153+
have : is_compact K := compact_iff_closed_bounded.2 ⟨A, B⟩,
154+
convert this.image f_cont,
155+
exact (hf.image_preimage _).symm
156+
end
157+
158+
end antilipschitz_with
159+
132160
lemma lipschitz_with.to_right_inverse [emetric_space α] [emetric_space β] {K : ℝ≥0} {f : α → β}
133161
(hf : lipschitz_with K f) {g : β → α} (hg : function.right_inverse g f) :
134162
antilipschitz_with K g :=

src/topology/metric_space/basic.lean

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1574,31 +1574,6 @@ lemma compact_iff_closed_bounded [proper_space α] :
15741574
exact compact_of_is_closed_subset (proper_space.compact_ball x r) hc hr
15751575
end
15761576

1577-
/-- The image of a proper space under an expanding onto map is proper. -/
1578-
lemma proper_image_of_proper [proper_space α] [metric_space β] (f : α → β)
1579-
(f_cont : continuous f) (hf : range f = univ) (C : ℝ)
1580-
(hC : ∀x y, dist x y ≤ C * dist (f x) (f y)) : proper_space β :=
1581-
begin
1582-
apply proper_space_of_compact_closed_ball_of_le 0 (λx₀ r hr, _),
1583-
let K := f ⁻¹' (closed_ball x₀ r),
1584-
have A : is_closed K :=
1585-
continuous_iff_is_closed.1 f_cont (closed_ball x₀ r) is_closed_ball,
1586-
have B : bounded K := ⟨max C 0 * (r + r), λx y hx hy, calc
1587-
dist x y ≤ C * dist (f x) (f y) : hC x y
1588-
... ≤ max C 0 * dist (f x) (f y) : mul_le_mul_of_nonneg_right (le_max_left _ _) (dist_nonneg)
1589-
... ≤ max C 0 * (dist (f x) x₀ + dist (f y) x₀) :
1590-
mul_le_mul_of_nonneg_left (dist_triangle_right (f x) (f y) x₀) (le_max_right _ _)
1591-
... ≤ max C 0 * (r + r) : begin
1592-
simp only [mem_closed_ball, mem_preimage] at hx hy,
1593-
exact mul_le_mul_of_nonneg_left (add_le_add hx hy) (le_max_right _ _)
1594-
end⟩,
1595-
have : is_compact K := compact_iff_closed_bounded.2 ⟨A, B⟩,
1596-
have C : is_compact (f '' K) := this.image f_cont,
1597-
have : f '' K = closed_ball x₀ r,
1598-
by { rw image_preimage_eq_of_subset, rw hf, exact subset_univ _ },
1599-
rwa this at C
1600-
end
1601-
16021577
end bounded
16031578

16041579
section diam

0 commit comments

Comments
 (0)