@@ -63,8 +63,8 @@ The Coq code is available at the following address: <http://www.lri.fr/~sboldo/e
63
63
64
64
noncomputable theory
65
65
66
- open is_R_or_C real
67
- open_locale big_operators classical
66
+ open is_R_or_C real filter
67
+ open_locale big_operators classical topological_space
68
68
69
69
variables {𝕜 E F : Type *} [is_R_or_C 𝕜]
70
70
@@ -1214,6 +1214,17 @@ end is_R_or_C_to_real
1214
1214
1215
1215
section deriv
1216
1216
1217
+ /-!
1218
+ ### Derivative of the inner product
1219
+
1220
+ In this section we prove that the inner product and square of the norm in an inner space are
1221
+ infinitely `ℝ`-smooth. In order to state these results, we need a `normed_space ℝ E`
1222
+ instance. Though we can deduce this structure from `inner_product_space 𝕜 E`, this instance may be
1223
+ not definitionally equal to some other “natural” instance. So, we assume `[normed_space ℝ E]` and
1224
+ `[is_scalar_tower ℝ 𝕜 E]`. In both interesting cases `𝕜 = ℝ` and `𝕜 = ℂ` we have these instances.
1225
+
1226
+ -/
1227
+
1217
1228
variables [normed_space ℝ E] [is_scalar_tower ℝ 𝕜 E]
1218
1229
1219
1230
lemma is_bounded_bilinear_map_inner : is_bounded_bilinear_map ℝ (λ p : E × E, ⟪p.1 , p.2 ⟫) :=
@@ -1226,6 +1237,12 @@ lemma is_bounded_bilinear_map_inner : is_bounded_bilinear_map ℝ (λ p : E × E
1226
1237
bound := ⟨1 , zero_lt_one, λ x y,
1227
1238
by { rw [one_mul, is_R_or_C.norm_eq_abs], exact abs_inner_le_norm x y, }⟩ }
1228
1239
1240
+ /-- Derivative of the inner product. -/
1241
+ def fderiv_inner_clm (p : E × E) : E × E →L[ℝ] 𝕜 := is_bounded_bilinear_map_inner.deriv p
1242
+
1243
+ @[simp] lemma fderiv_inner_clm_apply (p x : E × E) :
1244
+ fderiv_inner_clm p x = ⟪p.1 , x.2 ⟫ + ⟪x.1 , p.2 ⟫ := rfl
1245
+
1229
1246
lemma times_cont_diff_inner {n} : times_cont_diff ℝ n (λ p : E × E, ⟪p.1 , p.2 ⟫) :=
1230
1247
is_bounded_bilinear_map_inner.times_cont_diff
1231
1248
@@ -1234,10 +1251,7 @@ lemma times_cont_diff_at_inner {p : E × E} {n} :
1234
1251
times_cont_diff_inner.times_cont_diff_at
1235
1252
1236
1253
lemma differentiable_inner : differentiable ℝ (λ p : E × E, ⟪p.1 , p.2 ⟫) :=
1237
- times_cont_diff_inner.differentiable le_rfl
1238
-
1239
- lemma continuous_inner : continuous (λ p : E × E, ⟪p.1 , p.2 ⟫) :=
1240
- differentiable_inner.continuous
1254
+ is_bounded_bilinear_map_inner.differentiable_at
1241
1255
1242
1256
variables {G : Type *} [normed_group G] [normed_space ℝ G]
1243
1257
{f g : G → E} {f' g' : G →L[ℝ] E} {s : set G} {x : G} {n : with_top ℕ}
@@ -1262,6 +1276,25 @@ lemma times_cont_diff.inner (hf : times_cont_diff ℝ n f) (hg : times_cont_diff
1262
1276
times_cont_diff ℝ n (λ x, ⟪f x, g x⟫) :=
1263
1277
times_cont_diff_inner.comp (hf.prod hg)
1264
1278
1279
+ lemma has_fderiv_within_at.inner (hf : has_fderiv_within_at f f' s x)
1280
+ (hg : has_fderiv_within_at g g' s x) :
1281
+ has_fderiv_within_at (λ t, ⟪f t, g t⟫) ((fderiv_inner_clm (f x, g x)).comp $ f'.prod g') s x :=
1282
+ (is_bounded_bilinear_map_inner.has_fderiv_at (f x, g x)).comp_has_fderiv_within_at x (hf.prod hg)
1283
+
1284
+ lemma has_fderiv_at.inner (hf : has_fderiv_at f f' x) (hg : has_fderiv_at g g' x) :
1285
+ has_fderiv_at (λ t, ⟪f t, g t⟫) ((fderiv_inner_clm (f x, g x)).comp $ f'.prod g') x :=
1286
+ (is_bounded_bilinear_map_inner.has_fderiv_at (f x, g x)).comp x (hf.prod hg)
1287
+
1288
+ lemma has_deriv_within_at.inner {f g : ℝ → E} {f' g' : E} {s : set ℝ} {x : ℝ}
1289
+ (hf : has_deriv_within_at f f' s x) (hg : has_deriv_within_at g g' s x) :
1290
+ has_deriv_within_at (λ t, ⟪f t, g t⟫) (⟪f x, g'⟫ + ⟪f', g x⟫) s x :=
1291
+ by simpa using (hf.has_fderiv_within_at.inner hg.has_fderiv_within_at).has_deriv_within_at
1292
+
1293
+ lemma has_deriv_at.inner {f g : ℝ → E} {f' g' : E} {x : ℝ} :
1294
+ has_deriv_at f f' x → has_deriv_at g g' x →
1295
+ has_deriv_at (λ t, ⟪f t, g t⟫) (⟪f x, g'⟫ + ⟪f', g x⟫) x :=
1296
+ by simpa only [← has_deriv_within_at_univ] using has_deriv_within_at.inner
1297
+
1265
1298
lemma differentiable_within_at.inner (hf : differentiable_within_at ℝ f s x)
1266
1299
(hg : differentiable_within_at ℝ g s x) :
1267
1300
differentiable_within_at ℝ (λ x, ⟪f x, g x⟫) s x :=
@@ -1280,8 +1313,106 @@ lemma differentiable.inner (hf : differentiable ℝ f) (hg : differentiable ℝ
1280
1313
differentiable ℝ (λ x, ⟪f x, g x⟫) :=
1281
1314
λ x, (hf x).inner (hg x)
1282
1315
1316
+ lemma fderiv_inner_apply (hf : differentiable_at ℝ f x) (hg : differentiable_at ℝ g x) (y : G) :
1317
+ fderiv ℝ (λ t, ⟪f t, g t⟫) x y = ⟪f x, fderiv ℝ g x y⟫ + ⟪fderiv ℝ f x y, g x⟫ :=
1318
+ by { rw [(hf.has_fderiv_at.inner hg.has_fderiv_at).fderiv], refl }
1319
+
1320
+ lemma deriv_inner_apply {f g : ℝ → E} {x : ℝ} (hf : differentiable_at ℝ f x)
1321
+ (hg : differentiable_at ℝ g x) :
1322
+ deriv (λ t, ⟪f t, g t⟫) x = ⟪f x, deriv g x⟫ + ⟪deriv f x, g x⟫ :=
1323
+ (hf.has_deriv_at.inner hg.has_deriv_at).deriv
1324
+
1325
+ lemma times_cont_diff_norm_square : times_cont_diff ℝ n (λ x : E, ∥x∥ ^ 2 ) :=
1326
+ begin
1327
+ simp only [pow_two, ← inner_self_eq_norm_square],
1328
+ exact (re_clm : 𝕜 →L[ℝ] ℝ).times_cont_diff.comp (times_cont_diff_id.inner times_cont_diff_id)
1329
+ end
1330
+
1331
+ lemma times_cont_diff.norm_square (hf : times_cont_diff ℝ n f) :
1332
+ times_cont_diff ℝ n (λ x, ∥f x∥ ^ 2 ) :=
1333
+ times_cont_diff_norm_square.comp hf
1334
+
1335
+ lemma times_cont_diff_within_at.norm_square (hf : times_cont_diff_within_at ℝ n f s x) :
1336
+ times_cont_diff_within_at ℝ n (λ y, ∥f y∥ ^ 2 ) s x :=
1337
+ times_cont_diff_norm_square.times_cont_diff_at.comp_times_cont_diff_within_at x hf
1338
+
1339
+ lemma times_cont_diff_at.norm_square (hf : times_cont_diff_at ℝ n f x) :
1340
+ times_cont_diff_at ℝ n (λ y, ∥f y∥ ^ 2 ) x :=
1341
+ hf.norm_square
1342
+
1343
+ lemma times_cont_diff_on.norm_square (hf : times_cont_diff_on ℝ n f s) :
1344
+ times_cont_diff_on ℝ n (λ y, ∥f y∥ ^ 2 ) s :=
1345
+ (λ x hx, (hf x hx).norm_square)
1346
+
1347
+ lemma differentiable_at.norm_square (hf : differentiable_at ℝ f x) :
1348
+ differentiable_at ℝ (λ y, ∥f y∥ ^ 2 ) x :=
1349
+ (times_cont_diff_norm_square.differentiable le_rfl).differentiable_at.comp x hf
1350
+
1351
+ lemma differentiable.norm_square (hf : differentiable ℝ f) : differentiable ℝ (λ y, ∥f y∥ ^ 2 ) :=
1352
+ λ x, (hf x).norm_square
1353
+
1354
+ lemma differentiable_within_at.norm_square (hf : differentiable_within_at ℝ f s x) :
1355
+ differentiable_within_at ℝ (λ y, ∥f y∥ ^ 2 ) s x :=
1356
+ (times_cont_diff_norm_square.differentiable le_rfl).differentiable_at.comp_differentiable_within_at
1357
+ x hf
1358
+
1359
+ lemma differentiable_on.norm_square (hf : differentiable_on ℝ f s) :
1360
+ differentiable_on ℝ (λ y, ∥f y∥ ^ 2 ) s :=
1361
+ λ x hx, (hf x hx).norm_square
1362
+
1283
1363
end deriv
1284
1364
1365
+ section continuous
1366
+
1367
+ /-!
1368
+ ### Continuity and measurability of the inner product
1369
+
1370
+ Since the inner product is `ℝ`-smooth, it is continuous. We do not need a `[normed_space ℝ E]`
1371
+ structure to *state* this fact and its corollaries, so we introduce them in the proof instead.
1372
+ -/
1373
+
1374
+ lemma continuous_inner : continuous (λ p : E × E, ⟪p.1 , p.2 ⟫) :=
1375
+ begin
1376
+ letI : inner_product_space ℝ E := inner_product_space.is_R_or_C_to_real 𝕜 E,
1377
+ letI : is_scalar_tower ℝ 𝕜 E := restrict_scalars.is_scalar_tower _ _ _,
1378
+ exact differentiable_inner.continuous
1379
+ end
1380
+
1381
+ variables {α : Type *}
1382
+
1383
+ lemma filter.tendsto.inner {f g : α → E} {l : filter α} {x y : E} (hf : tendsto f l (𝓝 x))
1384
+ (hg : tendsto g l (𝓝 y)) :
1385
+ tendsto (λ t, ⟪f t, g t⟫) l (𝓝 ⟪x, y⟫) :=
1386
+ (continuous_inner.tendsto _).comp (hf.prod_mk_nhds hg)
1387
+
1388
+ lemma measurable.inner [measurable_space α] [measurable_space E] [opens_measurable_space E]
1389
+ [topological_space.second_countable_topology E] [measurable_space 𝕜] [borel_space 𝕜]
1390
+ {f g : α → E} (hf : measurable f) (hg : measurable g) :
1391
+ measurable (λ t, ⟪f t, g t⟫) :=
1392
+ continuous.measurable2 continuous_inner hf hg
1393
+
1394
+ variables [topological_space α] {f g : α → E} {x : α} {s : set α}
1395
+
1396
+ include 𝕜
1397
+
1398
+ lemma continuous_within_at.inner (hf : continuous_within_at f s x)
1399
+ (hg : continuous_within_at g s x) :
1400
+ continuous_within_at (λ t, ⟪f t, g t⟫) s x :=
1401
+ hf.inner hg
1402
+
1403
+ lemma continuous_at.inner (hf : continuous_at f x) (hg : continuous_at g x) :
1404
+ continuous_at (λ t, ⟪f t, g t⟫) x :=
1405
+ hf.inner hg
1406
+
1407
+ lemma continuous_on.inner (hf : continuous_on f s) (hg : continuous_on g s) :
1408
+ continuous_on (λ t, ⟪f t, g t⟫) s :=
1409
+ λ x hx, (hf x hx).inner (hg x hx)
1410
+
1411
+ lemma continuous.inner (hf : continuous f) (hg : continuous g) : continuous (λ t, ⟪f t, g t⟫) :=
1412
+ continuous_iff_continuous_at.2 $ λ x, hf.continuous_at.inner hg.continuous_at
1413
+
1414
+ end continuous
1415
+
1285
1416
section pi_Lp
1286
1417
local attribute [reducible] pi_Lp
1287
1418
variables {ι : Type *} [fintype ι]
0 commit comments