@@ -31,215 +31,213 @@ open bounded_continuous_function
31
31
32
32
namespace continuous_map
33
33
34
- variables (α β μ : Type *) [topological_space α] [compact_space α] [normed_group β] [metric_space μ]
34
+ variables {α β E : Type *} [topological_space α] [compact_space α] [metric_space β] [normed_group E]
35
+
36
+ section
37
+
38
+ variables (α β)
35
39
36
40
/--
37
- When `α` is compact, the bounded continuous maps `α →ᵇ 𝕜 ` are
38
- equivalent to `C(α, 𝕜 )`.
41
+ When `α` is compact, the bounded continuous maps `α →ᵇ β ` are
42
+ equivalent to `C(α, β )`.
39
43
-/
40
- @[simps]
41
- def equiv_bounded_of_compact : C(α, μ ) ≃ (α →ᵇ μ ) :=
42
- ⟨mk_of_compact, forget_boundedness α μ , λ f, by { ext, refl, }, λ f, by { ext, refl, }⟩
44
+ @[simps { fully_applied := ff } ]
45
+ def equiv_bounded_of_compact : C(α, β ) ≃ (α →ᵇ β ) :=
46
+ ⟨mk_of_compact, forget_boundedness α β , λ f, by { ext, refl, }, λ f, by { ext, refl, }⟩
43
47
44
48
/--
45
49
When `α` is compact, the bounded continuous maps `α →ᵇ 𝕜` are
46
50
additively equivalent to `C(α, 𝕜)`.
47
51
-/
48
- @[simps]
49
- def add_equiv_bounded_of_compact : C(α, β) ≃+ (α →ᵇ β) :=
50
- ({ ..forget_boundedness_add_hom α β,
51
- ..(equiv_bounded_of_compact α β).symm, } : (α →ᵇ β) ≃+ C(α, β)).symm
52
-
53
- -- It would be nice if `@[simps]` produced this directly,
54
- -- instead of the unhelpful `add_equiv_bounded_of_compact_apply_to_continuous_map`.
55
- @[simp]
56
- lemma add_equiv_bounded_of_compact_apply_apply (f : C(α, β)) (a : α) :
57
- add_equiv_bounded_of_compact α β f a = f a :=
58
- rfl
59
-
60
- @[simp]
61
- lemma add_equiv_bounded_of_compact_to_equiv :
62
- (add_equiv_bounded_of_compact α β).to_equiv = equiv_bounded_of_compact α β :=
63
- rfl
52
+ @[simps apply symm_apply { fully_applied := ff }]
53
+ def add_equiv_bounded_of_compact [add_monoid β] [has_lipschitz_add β] :
54
+ C(α, β) ≃+ (α →ᵇ β) :=
55
+ ({ .. forget_boundedness_add_hom α β,
56
+ .. (equiv_bounded_of_compact α β).symm, } : (α →ᵇ β) ≃+ C(α, β)).symm
64
57
65
- instance : metric_space C(α,μ ) :=
58
+ instance : metric_space C(α, β ) :=
66
59
metric_space.induced
67
- (equiv_bounded_of_compact α μ )
68
- (equiv_bounded_of_compact α μ ).injective
60
+ (equiv_bounded_of_compact α β )
61
+ (equiv_bounded_of_compact α β ).injective
69
62
(by apply_instance)
70
63
64
+ /--
65
+ When `α` is compact, and `β` is a metric space, the bounded continuous maps `α →ᵇ β` are
66
+ isometric to `C(α, β)`.
67
+ -/
68
+ @[simps to_equiv apply symm_apply { fully_applied := ff }]
69
+ def isometric_bounded_of_compact :
70
+ C(α, β) ≃ᵢ (α →ᵇ β) :=
71
+ { isometry_to_fun := λ x y, rfl,
72
+ to_equiv := equiv_bounded_of_compact α β }
73
+
74
+ end
75
+
76
+ @[simp] lemma _root_.bounded_continuous_function.dist_mk_of_compact (f g : C(α, β)) :
77
+ dist (mk_of_compact f) (mk_of_compact g) = dist f g := rfl
78
+
79
+ @[simp] lemma _root_.bounded_continuous_function.dist_forget_boundedness (f g : α →ᵇ β) :
80
+ dist (f.forget_boundedness _ _) (g.forget_boundedness _ _) = dist f g := rfl
81
+
82
+ open bounded_continuous_function
83
+
71
84
section
72
- variables {α β} (f g : C(α, β)) {C : ℝ}
85
+ variables {α β} {f g : C(α, β)} {C : ℝ}
86
+
87
+ /-- The pointwise distance is controlled by the distance between functions, by definition. -/
88
+ lemma dist_apply_le_dist (x : α) : dist (f x) (g x) ≤ dist f g :=
89
+ by simp only [← dist_mk_of_compact, dist_coe_le_dist, ← mk_of_compact_apply]
73
90
74
91
/-- The distance between two functions is controlled by the supremum of the pointwise distances -/
75
92
lemma dist_le (C0 : (0 : ℝ) ≤ C) : dist f g ≤ C ↔ ∀x:α, dist (f x) (g x) ≤ C :=
76
- @bounded_continuous_function.dist_le _ _ _ _
77
- ((equiv_bounded_of_compact α β) f) ((equiv_bounded_of_compact α β) g) _ C0
93
+ by simp only [← dist_mk_of_compact, dist_le C0, mk_of_compact_apply]
78
94
79
95
lemma dist_le_iff_of_nonempty [nonempty α] :
80
96
dist f g ≤ C ↔ ∀ x, dist (f x) (g x) ≤ C :=
81
- @bounded_continuous_function.dist_le_iff_of_nonempty _ _ _ _
82
- ((equiv_bounded_of_compact α β) f) ((equiv_bounded_of_compact α β) g) _ _
97
+ by simp only [← dist_mk_of_compact, dist_le_iff_of_nonempty, mk_of_compact_apply]
83
98
84
- lemma dist_lt_of_nonempty [nonempty α]
85
- (w : ∀x:α, dist (f x) (g x) < C) : dist f g < C :=
86
- @bounded_continuous_function.dist_lt_of_nonempty_compact _ _ _ _
87
- ((equiv_bounded_of_compact α β) f) ((equiv_bounded_of_compact α β) g) _ _ _ w
88
-
89
- lemma dist_lt_iff (C0 : (0 : ℝ) < C) :
99
+ lemma dist_lt_iff_of_nonempty [nonempty α] :
90
100
dist f g < C ↔ ∀x:α, dist (f x) (g x) < C :=
91
- @bounded_continuous_function.dist_lt_iff_of_compact _ _ _ _
92
- ((equiv_bounded_of_compact α β) f) ((equiv_bounded_of_compact α β) g) _ _ C0
101
+ by simp only [← dist_mk_of_compact, dist_lt_iff_of_nonempty_compact, mk_of_compact_apply]
93
102
94
- lemma dist_lt_iff_of_nonempty [nonempty α] :
103
+ lemma dist_lt_of_nonempty [nonempty α] (w : ∀x:α, dist (f x) (g x) < C) : dist f g < C :=
104
+ (dist_lt_iff_of_nonempty).2 w
105
+
106
+ lemma dist_lt_iff (C0 : (0 : ℝ) < C) :
95
107
dist f g < C ↔ ∀x:α, dist (f x) (g x) < C :=
96
- @bounded_continuous_function.dist_lt_iff_of_nonempty_compact _ _ _ _
97
- ((equiv_bounded_of_compact α β) f) ((equiv_bounded_of_compact α β) g) _ _ _
108
+ by simp only [← dist_mk_of_compact, dist_lt_iff_of_compact C0, mk_of_compact_apply]
98
109
99
110
end
100
111
101
- variables (α β)
112
+ instance [complete_space β] : complete_space (C(α, β)) :=
113
+ (isometric_bounded_of_compact α β).complete_space
102
114
103
- /--
104
- When `α` is compact, and `β` is a metric space, the bounded continuous maps `α →ᵇ β` are
105
- isometric to `C(α, β)`.
106
- -/
107
- @[simps]
108
- def isometric_bounded_of_compact :
109
- C(α, μ) ≃ᵢ (α →ᵇ μ) :=
110
- { isometry_to_fun := λ x y, rfl,
111
- to_equiv := equiv_bounded_of_compact α μ }
115
+ @[continuity] lemma continuous_eval : continuous (λ p : C(α, β) × α, p.1 p.2 ) :=
116
+ continuous_eval.comp ((isometric_bounded_of_compact α β).continuous.prod_map continuous_id)
117
+
118
+ @[continuity] lemma continuous_evalx (x : α) : continuous (λ f : C(α, β), f x) :=
119
+ continuous_eval.comp (continuous_id.prod_mk continuous_const)
120
+
121
+ lemma continuous_coe : @continuous (C(α, β)) (α → β) _ _ coe_fn :=
122
+ continuous_pi continuous_evalx
112
123
113
124
-- TODO at some point we will need lemmas characterising this norm!
114
- -- At the moment the only way to reason about it is to transfer `f : C(α,β )` back to `α →ᵇ β `.
115
- instance : has_norm C(α,β ) :=
125
+ -- At the moment the only way to reason about it is to transfer `f : C(α,E )` back to `α →ᵇ E `.
126
+ instance : has_norm C(α, E ) :=
116
127
{ norm := λ x, dist x 0 }
117
128
118
- instance : normed_group C(α,β) :=
129
+ @[simp] lemma _root_.bounded_continuous_function.norm_mk_of_compact (f : C(α, E)) :
130
+ ∥mk_of_compact f∥ = ∥f∥ := rfl
131
+
132
+ @[simp] lemma _root_.bounded_continuous_function.norm_forget_boundedness_eq (f : α →ᵇ E) :
133
+ ∥forget_boundedness α E f∥ = ∥f∥ :=
134
+ rfl
135
+
136
+ open bounded_continuous_function
137
+
138
+ instance : normed_group C(α, E) :=
119
139
{ dist_eq := λ x y,
120
140
begin
121
- change dist x y = dist (x-y) 0 ,
122
- -- it would be nice if `equiv_rw` could rewrite in multiple places at once
123
- equiv_rw (equiv_bounded_of_compact α β) at x,
124
- equiv_rw (equiv_bounded_of_compact α β) at y,
125
- have p : dist x y = dist (x-y) 0 , { rw dist_eq_norm, rw dist_zero_right, },
126
- convert p,
127
- exact ((add_equiv_bounded_of_compact α β).symm.map_sub _ _).symm,
141
+ rw [← norm_mk_of_compact, ← dist_mk_of_compact, dist_eq_norm],
142
+ congr' 1 ,
143
+ exact ((add_equiv_bounded_of_compact α E).map_sub _ _).symm
128
144
end , }
129
145
130
146
section
131
- variables {α β} (f : C(α, β ))
147
+ variables (f : C(α, E ))
132
148
-- The corresponding lemmas for `bounded_continuous_function` are stated with `{f}`,
133
149
-- and so can not be used in dot notation.
134
150
135
151
lemma norm_coe_le_norm (x : α) : ∥f x∥ ≤ ∥f∥ :=
136
- ((equiv_bounded_of_compact α β) f).norm_coe_le_norm x
152
+ (mk_of_compact f).norm_coe_le_norm x
137
153
138
154
/-- Distance between the images of any two points is at most twice the norm of the function. -/
139
155
lemma dist_le_two_norm (x y : α) : dist (f x) (f y) ≤ 2 * ∥f∥ :=
140
- ((equiv_bounded_of_compact α β) f).dist_le_two_norm x y
156
+ (mk_of_compact f).dist_le_two_norm x y
141
157
142
158
/-- The norm of a function is controlled by the supremum of the pointwise norms -/
143
159
lemma norm_le {C : ℝ} (C0 : (0 : ℝ) ≤ C) : ∥f∥ ≤ C ↔ ∀x:α, ∥f x∥ ≤ C :=
144
160
@bounded_continuous_function.norm_le _ _ _ _
145
- ((equiv_bounded_of_compact α β) f) _ C0
161
+ (mk_of_compact f) _ C0
146
162
147
163
lemma norm_le_of_nonempty [nonempty α] {M : ℝ} : ∥f∥ ≤ M ↔ ∀ x, ∥f x∥ ≤ M :=
148
- @bounded_continuous_function.norm_le_of_nonempty _ _ _ _ _
149
- ((equiv_bounded_of_compact α β) f) _
164
+ @bounded_continuous_function.norm_le_of_nonempty _ _ _ _ _ (mk_of_compact f) _
150
165
151
166
lemma norm_lt_iff {M : ℝ} (M0 : 0 < M) : ∥f∥ < M ↔ ∀ x, ∥f x∥ < M :=
152
- @bounded_continuous_function.norm_lt_iff_of_compact _ _ _ _ _
153
- ((equiv_bounded_of_compact α β) f) _ M0
167
+ @bounded_continuous_function.norm_lt_iff_of_compact _ _ _ _ _ (mk_of_compact f) _ M0
154
168
155
169
lemma norm_lt_iff_of_nonempty [nonempty α] {M : ℝ} :
156
170
∥f∥ < M ↔ ∀ x, ∥f x∥ < M :=
157
- @bounded_continuous_function.norm_lt_iff_of_nonempty_compact _ _ _ _ _ _
158
- ((equiv_bounded_of_compact α β) f) _
171
+ @bounded_continuous_function.norm_lt_iff_of_nonempty_compact _ _ _ _ _ _ (mk_of_compact f) _
159
172
160
173
lemma apply_le_norm (f : C(α, ℝ)) (x : α) : f x ≤ ∥f∥ :=
161
174
le_trans (le_abs.mpr (or.inl (le_refl (f x)))) (f.norm_coe_le_norm x)
162
175
163
176
lemma neg_norm_le_apply (f : C(α, ℝ)) (x : α) : -∥f∥ ≤ f x :=
164
177
le_trans (neg_le_neg (f.norm_coe_le_norm x)) (neg_le.mp (neg_le_abs_self (f x)))
165
178
166
- @[simp] lemma _root_.bounded_continuous_function.norm_forget_boundedness_eq (f : α →ᵇ β) :
167
- ∥forget_boundedness α β f∥ = ∥f∥ :=
168
- rfl
169
-
170
179
lemma norm_eq_supr_norm : ∥f∥ = ⨆ x : α, ∥f x∥ :=
171
- begin
172
- equiv_rw equiv_bounded_of_compact α β at f,
173
- rw [equiv_bounded_of_compact_symm_apply, forget_boundedness_coe, f.norm_forget_boundedness_eq,
174
- f.norm_eq_supr_norm],
175
- end
180
+ (mk_of_compact f).norm_eq_supr_norm
176
181
177
182
end
178
183
179
184
section
180
185
variables {R : Type *} [normed_ring R]
181
186
182
187
instance : normed_ring C(α,R) :=
183
- { norm_mul := λ f g,
184
- begin
185
- equiv_rw (equiv_bounded_of_compact α R) at f,
186
- equiv_rw (equiv_bounded_of_compact α R) at g,
187
- exact norm_mul_le f g,
188
- end ,
188
+ { norm_mul := λ f g, norm_mul_le (mk_of_compact f) (mk_of_compact g),
189
189
..(infer_instance : normed_group C(α,R)) }
190
190
191
191
end
192
192
193
193
section
194
- variables {𝕜 : Type *} [normed_field 𝕜] [normed_space 𝕜 β ]
194
+ variables {𝕜 : Type *} [normed_field 𝕜] [normed_space 𝕜 E ]
195
195
196
- instance : normed_space 𝕜 C(α,β) :=
197
- { norm_smul_le := λ c f,
198
- begin
199
- equiv_rw (equiv_bounded_of_compact α β) at f,
200
- exact le_of_eq (norm_smul c f),
201
- end }
196
+ instance : normed_space 𝕜 C(α,E) :=
197
+ { norm_smul_le := λ c f, le_of_eq (norm_smul c (mk_of_compact f)) }
202
198
203
- variables (α 𝕜)
199
+ section
200
+ variables (α 𝕜 E)
204
201
205
202
/--
206
203
When `α` is compact and `𝕜` is a normed field,
207
204
the `𝕜`-algebra of bounded continuous maps `α →ᵇ β` is
208
205
`𝕜`-linearly isometric to `C(α, β)`.
209
206
-/
210
207
def linear_isometry_bounded_of_compact :
211
- C(α, β ) ≃ₗᵢ[𝕜] (α →ᵇ β ) :=
208
+ C(α, E ) ≃ₗᵢ[𝕜] (α →ᵇ E ) :=
212
209
{ map_smul' := λ c f, by { ext, simp, },
213
210
norm_map' := λ f, rfl,
214
- ..add_equiv_bounded_of_compact α β }
211
+ .. add_equiv_bounded_of_compact α E }
212
+
213
+ end
215
214
216
215
-- this lemma and the next are the analogues of those autogenerated by `@[simps]` for
217
216
-- `equiv_bounded_of_compact`, `add_equiv_bounded_of_compact`
218
- @[simp] lemma linear_isometry_bounded_of_compact_symm_apply (f : α →ᵇ β ) :
219
- (linear_isometry_bounded_of_compact α β 𝕜).symm f = f.forget_boundedness α β :=
217
+ @[simp] lemma linear_isometry_bounded_of_compact_symm_apply (f : α →ᵇ E ) :
218
+ (linear_isometry_bounded_of_compact α E 𝕜).symm f = f.forget_boundedness α E :=
220
219
rfl
221
220
222
- @[simp] lemma linear_isometry_bounded_of_compact_apply_apply (f : C(α, β )) (a : α) :
223
- (( linear_isometry_bounded_of_compact α β 𝕜) f) a = f a :=
221
+ @[simp] lemma linear_isometry_bounded_of_compact_apply_apply (f : C(α, E )) (a : α) :
222
+ (linear_isometry_bounded_of_compact α E 𝕜 f) a = f a :=
224
223
rfl
225
224
226
225
227
226
@[simp]
228
227
lemma linear_isometry_bounded_of_compact_to_isometric :
229
- (linear_isometry_bounded_of_compact α β 𝕜).to_isometric =
230
- isometric_bounded_of_compact α β :=
228
+ (linear_isometry_bounded_of_compact α E 𝕜).to_isometric = (isometric_bounded_of_compact α E) :=
231
229
rfl
232
230
233
231
@[simp]
234
232
lemma linear_isometry_bounded_of_compact_to_add_equiv :
235
- (linear_isometry_bounded_of_compact α β 𝕜).to_linear_equiv.to_add_equiv =
236
- add_equiv_bounded_of_compact α β :=
233
+ (linear_isometry_bounded_of_compact α E 𝕜).to_linear_equiv.to_add_equiv =
234
+ ( add_equiv_bounded_of_compact α E) :=
237
235
rfl
238
236
239
237
@[simp]
240
238
lemma linear_isometry_bounded_of_compact_of_compact_to_equiv :
241
- (linear_isometry_bounded_of_compact α β 𝕜).to_linear_equiv.to_equiv =
242
- equiv_bounded_of_compact α β :=
239
+ (linear_isometry_bounded_of_compact α E 𝕜).to_linear_equiv.to_equiv =
240
+ ( equiv_bounded_of_compact α E) :=
243
241
rfl
244
242
245
243
end
@@ -280,12 +278,12 @@ def modulus (f : C(α, β)) (ε : ℝ) (h : 0 < ε) : ℝ :=
280
278
classical.some (uniform_continuity f ε h)
281
279
282
280
lemma modulus_pos (f : C(α, β)) {ε : ℝ} {h : 0 < ε} : 0 < f.modulus ε h :=
283
- classical.some (classical.some_spec (uniform_continuity f ε h))
281
+ (classical.some_spec (uniform_continuity f ε h)).fst
284
282
285
283
lemma dist_lt_of_dist_lt_modulus
286
284
(f : C(α, β)) (ε : ℝ) (h : 0 < ε) {a b : α} (w : dist a b < f.modulus ε h) :
287
285
dist (f a) (f b) < ε :=
288
- classical.some_spec (classical.some_spec (uniform_continuity f ε h)) w
286
+ (classical.some_spec (uniform_continuity f ε h)).snd w
289
287
290
288
end uniform_continuity
291
289
@@ -312,7 +310,7 @@ protected def continuous_linear_map.comp_left_continuous_compact (g : β →L[
312
310
313
311
@[simp] lemma continuous_linear_map.to_linear_comp_left_continuous_compact (g : β →L[𝕜] γ) :
314
312
(g.comp_left_continuous_compact X : C(X, β) →ₗ[𝕜] C(X, γ)) = g.comp_left_continuous 𝕜 X :=
315
- by { ext f, simp [continuous_linear_map.comp_left_continuous_compact] }
313
+ by { ext f, refl }
316
314
317
315
@[simp] lemma continuous_linear_map.comp_left_continuous_compact_apply (g : β →L[𝕜] γ)
318
316
(f : C(X, β)) (x : X) :
@@ -346,7 +344,7 @@ def comp_right_continuous_map {X Y : Type*} (T : Type*)
346
344
refine metric.continuous_iff.mpr _,
347
345
intros g ε ε_pos,
348
346
refine ⟨ε, ε_pos, λ g' h, _⟩,
349
- rw continuous_map.dist_lt_iff _ _ ε_pos at h ⊢,
347
+ rw continuous_map.dist_lt_iff ε_pos at h ⊢,
350
348
{ exact λ x, h (f x), },
351
349
end }
352
350
0 commit comments