Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
100K - 1M
License:
/- | |
Copyright (c) 2020 Ruben Van de Velde. All rights reserved. | |
Released under Apache 2.0 license as described in the file LICENSE. | |
Authors: Ruben Van de Velde | |
-/ | |
import algebra.algebra.restrict_scalars | |
import data.complex.is_R_or_C | |
/-! | |
# Extending a continuous `β`-linear map to a continuous `π`-linear map | |
In this file we provide a way to extend a continuous `β`-linear map to a continuous `π`-linear map | |
in a way that bounds the norm by the norm of the original map, when `π` is either `β` (the | |
extension is trivial) or `β`. We formulate the extension uniformly, by assuming `is_R_or_C π`. | |
We motivate the form of the extension as follows. Note that `fc : F ββ[π] π` is determined fully by | |
`Re fc`: for all `x : F`, `fc (I β’ x) = I * fc x`, so `Im (fc x) = -Re (fc (I β’ x))`. Therefore, | |
given an `fr : F ββ[β] β`, we define `fc x = fr x - fr (I β’ x) * I`. | |
## Main definitions | |
* `linear_map.extend_to_π` | |
* `continuous_linear_map.extend_to_π` | |
## Implementation details | |
For convenience, the main definitions above operate in terms of `restrict_scalars β π F`. | |
Alternate forms which operate on `[is_scalar_tower β π F]` instead are provided with a primed name. | |
-/ | |
open is_R_or_C | |
variables {π : Type*} [is_R_or_C π] {F : Type*} [seminormed_add_comm_group F] [normed_space π F] | |
local notation `absπ` := @is_R_or_C.abs π _ | |
/-- Extend `fr : F ββ[β] β` to `F ββ[π] π` in a way that will also be continuous and have its norm | |
bounded by `β₯frβ₯` if `fr` is continuous. -/ | |
noncomputable def linear_map.extend_to_π' | |
[module β F] [is_scalar_tower β π F] (fr : F ββ[β] β) : F ββ[π] π := | |
begin | |
let fc : F β π := Ξ» x, (fr x : π) - (I : π) * (fr ((I : π) β’ x)), | |
have add : β x y : F, fc (x + y) = fc x + fc y, | |
{ assume x y, | |
simp only [fc], | |
simp only [smul_add, linear_map.map_add, of_real_add], | |
rw mul_add, | |
abel, }, | |
have A : β (c : β) (x : F), (fr ((c : π) β’ x) : π) = (c : π) * (fr x : π), | |
{ assume c x, | |
rw [β of_real_mul], | |
congr' 1, | |
rw [is_R_or_C.of_real_alg, smul_assoc, fr.map_smul, algebra.id.smul_eq_mul, one_smul] }, | |
have smul_β : β (c : β) (x : F), fc ((c : π) β’ x) = (c : π) * fc x, | |
{ assume c x, | |
simp only [fc, A], | |
rw A c x, | |
rw [smul_smul, mul_comm I (c : π), β smul_smul, A, mul_sub], | |
ring }, | |
have smul_I : β x : F, fc ((I : π) β’ x) = (I : π) * fc x, | |
{ assume x, | |
simp only [fc], | |
cases @I_mul_I_ax π _ with h h, { simp [h] }, | |
rw [mul_sub, β mul_assoc, smul_smul, h], | |
simp only [neg_mul, linear_map.map_neg, one_mul, one_smul, | |
mul_neg, of_real_neg, neg_smul, sub_neg_eq_add, add_comm] }, | |
have smul_π : β (c : π) (x : F), fc (c β’ x) = c β’ fc x, | |
{ assume c x, | |
rw [β re_add_im c, add_smul, add_smul, add, smul_β, β smul_smul, smul_β, smul_I, β mul_assoc], | |
refl }, | |
exact { to_fun := fc, map_add' := add, map_smul' := smul_π } | |
end | |
lemma linear_map.extend_to_π'_apply [module β F] [is_scalar_tower β π F] | |
(fr : F ββ[β] β) (x : F) : | |
fr.extend_to_π' x = (fr x : π) - (I : π) * fr ((I : π) β’ x) := rfl | |
/-- The norm of the extension is bounded by `β₯frβ₯`. -/ | |
lemma norm_bound [normed_space β F] [is_scalar_tower β π F] (fr : F βL[β] β) (x : F) : | |
β₯(fr.to_linear_map.extend_to_π' x : π)β₯ β€ β₯frβ₯ * β₯xβ₯ := | |
begin | |
let lm : F ββ[π] π := fr.to_linear_map.extend_to_π', | |
-- We aim to find a `t : π` such that | |
-- * `lm (t β’ x) = fr (t β’ x)` (so `lm (t β’ x) = t * lm x β β`) | |
-- * `β₯lm xβ₯ = β₯lm (t β’ x)β₯` (so `t.abs` must be 1) | |
-- If `lm x β 0`, `(lm x)β»ΒΉ` satisfies the first requirement, and after normalizing, it | |
-- satisfies the second. | |
-- (If `lm x = 0`, the goal is trivial.) | |
classical, | |
by_cases h : lm x = 0, | |
{ rw [h, norm_zero], | |
apply mul_nonneg; exact norm_nonneg _ }, | |
let fx := (lm x)β»ΒΉ, | |
let t := fx / (absπ fx : π), | |
have ht : absπ t = 1, by field_simp [abs_of_real, of_real_inv, is_R_or_C.abs_inv, | |
is_R_or_C.abs_div, is_R_or_C.abs_abs, h], | |
have h1 : (fr (t β’ x) : π) = lm (t β’ x), | |
{ apply ext, | |
{ simp only [lm, of_real_re, linear_map.extend_to_π'_apply, mul_re, I_re, of_real_im, zero_mul, | |
add_monoid_hom.map_sub, sub_zero, mul_zero], | |
refl }, | |
{ symmetry, | |
calc im (lm (t β’ x)) | |
= im (t * lm x) : by rw [lm.map_smul, smul_eq_mul] | |
... = im ((lm x)β»ΒΉ / (absπ (lm x)β»ΒΉ) * lm x) : rfl | |
... = im (1 / (absπ (lm x)β»ΒΉ : π)) : by rw [div_mul_eq_mul_div, inv_mul_cancel h] | |
... = 0 : by rw [β of_real_one, β of_real_div, of_real_im] | |
... = im (fr (t β’ x) : π) : by rw [of_real_im] } }, | |
calc β₯lm xβ₯ = absπ t * β₯lm xβ₯ : by rw [ht, one_mul] | |
... = β₯t * lm xβ₯ : by rw [β norm_eq_abs, norm_mul] | |
... = β₯lm (t β’ x)β₯ : by rw [βsmul_eq_mul, lm.map_smul] | |
... = β₯(fr (t β’ x) : π)β₯ : by rw h1 | |
... = β₯fr (t β’ x)β₯ : by rw [norm_eq_abs, abs_of_real, norm_eq_abs, abs_to_real] | |
... β€ β₯frβ₯ * β₯t β’ xβ₯ : continuous_linear_map.le_op_norm _ _ | |
... = β₯frβ₯ * (β₯tβ₯ * β₯xβ₯) : by rw norm_smul | |
... β€ β₯frβ₯ * β₯xβ₯ : by rw [norm_eq_abs, ht, one_mul] | |
end | |
/-- Extend `fr : F βL[β] β` to `F βL[π] π`. -/ | |
noncomputable def continuous_linear_map.extend_to_π' [normed_space β F] [is_scalar_tower β π F] | |
(fr : F βL[β] β) : | |
F βL[π] π := | |
linear_map.mk_continuous _ (β₯frβ₯) (norm_bound _) | |
lemma continuous_linear_map.extend_to_π'_apply [normed_space β F] [is_scalar_tower β π F] | |
(fr : F βL[β] β) (x : F) : | |
fr.extend_to_π' x = (fr x : π) - (I : π) * fr ((I : π) β’ x) := rfl | |
/-- Extend `fr : restrict_scalars β π F ββ[β] β` to `F ββ[π] π`. -/ | |
noncomputable def linear_map.extend_to_π (fr : (restrict_scalars β π F) ββ[β] β) : F ββ[π] π := | |
fr.extend_to_π' | |
lemma linear_map.extend_to_π_apply (fr : (restrict_scalars β π F) ββ[β] β) (x : F) : | |
fr.extend_to_π x = (fr x : π) - (I : π) * fr ((I : π) β’ x : _) := rfl | |
/-- Extend `fr : restrict_scalars β π F βL[β] β` to `F βL[π] π`. -/ | |
noncomputable def continuous_linear_map.extend_to_π (fr : (restrict_scalars β π F) βL[β] β) : | |
F βL[π] π := | |
fr.extend_to_π' | |
lemma continuous_linear_map.extend_to_π_apply (fr : (restrict_scalars β π F) βL[β] β) (x : F) : | |
fr.extend_to_π x = (fr x : π) - (I : π) * fr ((I : π) β’ x : _) := rfl | |