Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
100K - 1M
License:
/- | |
Copyright (c) 2018 Patrick Massot. All rights reserved. | |
Released under Apache 2.0 license as described in the file LICENSE. | |
Authors: Patrick Massot, Johannes HΓΆlzl | |
-/ | |
import analysis.normed.field.basic | |
import analysis.normed.group.infinite_sum | |
import data.matrix.basic | |
import topology.sequences | |
/-! | |
# Normed spaces | |
In this file we define (semi)normed spaces and algebras. We also prove some theorems | |
about these definitions. | |
-/ | |
variables {Ξ± : Type*} {Ξ² : Type*} {Ξ³ : Type*} {ΞΉ : Type*} | |
noncomputable theory | |
open filter metric function set | |
open_locale topological_space big_operators nnreal ennreal uniformity pointwise | |
section seminormed_add_comm_group | |
section prio | |
set_option extends_priority 920 | |
-- Here, we set a rather high priority for the instance `[normed_space Ξ± Ξ²] : module Ξ± Ξ²` | |
-- to take precedence over `semiring.to_module` as this leads to instance paths with better | |
-- unification properties. | |
/-- A normed space over a normed field is a vector space endowed with a norm which satisfies the | |
equality `β₯c β’ xβ₯ = β₯cβ₯ β₯xβ₯`. We require only `β₯c β’ xβ₯ β€ β₯cβ₯ β₯xβ₯` in the definition, then prove | |
`β₯c β’ xβ₯ = β₯cβ₯ β₯xβ₯` in `norm_smul`. | |
Note that since this requires `seminormed_add_comm_group` and not `normed_add_comm_group`, this | |
typeclass can be used for "semi normed spaces" too, just as `module` can be used for | |
"semi modules". -/ | |
class normed_space (Ξ± : Type*) (Ξ² : Type*) [normed_field Ξ±] [seminormed_add_comm_group Ξ²] | |
extends module Ξ± Ξ² := | |
(norm_smul_le : β (a:Ξ±) (b:Ξ²), β₯a β’ bβ₯ β€ β₯aβ₯ * β₯bβ₯) | |
end prio | |
variables [normed_field Ξ±] [seminormed_add_comm_group Ξ²] | |
@[priority 100] -- see Note [lower instance priority] | |
instance normed_space.has_bounded_smul [normed_space Ξ± Ξ²] : has_bounded_smul Ξ± Ξ² := | |
{ dist_smul_pair' := Ξ» x yβ yβ, | |
by simpa [dist_eq_norm, smul_sub] using normed_space.norm_smul_le x (yβ - yβ), | |
dist_pair_smul' := Ξ» xβ xβ y, | |
by simpa [dist_eq_norm, sub_smul] using normed_space.norm_smul_le (xβ - xβ) y } | |
instance normed_field.to_normed_space : normed_space Ξ± Ξ± := | |
{ norm_smul_le := Ξ» a b, le_of_eq (norm_mul a b) } | |
lemma norm_smul [normed_space Ξ± Ξ²] (s : Ξ±) (x : Ξ²) : β₯s β’ xβ₯ = β₯sβ₯ * β₯xβ₯ := | |
begin | |
by_cases h : s = 0, | |
{ simp [h] }, | |
{ refine le_antisymm (normed_space.norm_smul_le s x) _, | |
calc β₯sβ₯ * β₯xβ₯ = β₯sβ₯ * β₯sβ»ΒΉ β’ s β’ xβ₯ : by rw [inv_smul_smulβ h] | |
... β€ β₯sβ₯ * (β₯sβ»ΒΉβ₯ * β₯s β’ xβ₯) : | |
mul_le_mul_of_nonneg_left (normed_space.norm_smul_le _ _) (norm_nonneg _) | |
... = β₯s β’ xβ₯ : | |
by rw [norm_inv, β mul_assoc, mul_inv_cancel (mt norm_eq_zero.1 h), one_mul] } | |
end | |
@[simp] lemma abs_norm_eq_norm (z : Ξ²) : |β₯zβ₯| = β₯zβ₯ := | |
(abs_eq (norm_nonneg z)).mpr (or.inl rfl) | |
lemma inv_norm_smul_mem_closed_unit_ball [normed_space β Ξ²] (x : Ξ²) : | |
β₯xβ₯β»ΒΉ β’ x β closed_ball (0 : Ξ²) 1 := | |
by simp only [mem_closed_ball_zero_iff, norm_smul, norm_inv, norm_norm, β div_eq_inv_mul, | |
div_self_le_one] | |
lemma dist_smul [normed_space Ξ± Ξ²] (s : Ξ±) (x y : Ξ²) : dist (s β’ x) (s β’ y) = β₯sβ₯ * dist x y := | |
by simp only [dist_eq_norm, (norm_smul _ _).symm, smul_sub] | |
lemma nnnorm_smul [normed_space Ξ± Ξ²] (s : Ξ±) (x : Ξ²) : β₯s β’ xβ₯β = β₯sβ₯β * β₯xβ₯β := | |
nnreal.eq $ norm_smul s x | |
lemma nndist_smul [normed_space Ξ± Ξ²] (s : Ξ±) (x y : Ξ²) : | |
nndist (s β’ x) (s β’ y) = β₯sβ₯β * nndist x y := | |
nnreal.eq $ dist_smul s x y | |
lemma lipschitz_with_smul [normed_space Ξ± Ξ²] (s : Ξ±) : lipschitz_with β₯sβ₯β ((β’) s : Ξ² β Ξ²) := | |
lipschitz_with_iff_dist_le_mul.2 $ Ξ» x y, by rw [dist_smul, coe_nnnorm] | |
lemma norm_smul_of_nonneg [normed_space β Ξ²] {t : β} (ht : 0 β€ t) (x : Ξ²) : | |
β₯t β’ xβ₯ = t * β₯xβ₯ := by rw [norm_smul, real.norm_eq_abs, abs_of_nonneg ht] | |
variables {E : Type*} [seminormed_add_comm_group E] [normed_space Ξ± E] | |
variables {F : Type*} [seminormed_add_comm_group F] [normed_space Ξ± F] | |
theorem eventually_nhds_norm_smul_sub_lt (c : Ξ±) (x : E) {Ξ΅ : β} (h : 0 < Ξ΅) : | |
βαΆ y in π x, β₯c β’ (y - x)β₯ < Ξ΅ := | |
have tendsto (Ξ» y, β₯c β’ (y - x)β₯) (π x) (π 0), | |
from ((continuous_id.sub continuous_const).const_smul _).norm.tendsto' _ _ (by simp), | |
this.eventually (gt_mem_nhds h) | |
lemma filter.tendsto.zero_smul_is_bounded_under_le {f : ΞΉ β Ξ±} {g : ΞΉ β E} {l : filter ΞΉ} | |
(hf : tendsto f l (π 0)) (hg : is_bounded_under (β€) l (norm β g)) : | |
tendsto (Ξ» x, f x β’ g x) l (π 0) := | |
hf.op_zero_is_bounded_under_le hg (β’) (Ξ» x y, (norm_smul x y).le) | |
lemma filter.is_bounded_under.smul_tendsto_zero {f : ΞΉ β Ξ±} {g : ΞΉ β E} {l : filter ΞΉ} | |
(hf : is_bounded_under (β€) l (norm β f)) (hg : tendsto g l (π 0)) : | |
tendsto (Ξ» x, f x β’ g x) l (π 0) := | |
hg.op_zero_is_bounded_under_le hf (flip (β’)) (Ξ» x y, ((norm_smul y x).trans (mul_comm _ _)).le) | |
theorem closure_ball [normed_space β E] (x : E) {r : β} (hr : r β 0) : | |
closure (ball x r) = closed_ball x r := | |
begin | |
refine subset.antisymm closure_ball_subset_closed_ball (Ξ» y hy, _), | |
have : continuous_within_at (Ξ» c : β, c β’ (y - x) + x) (Ico 0 1) 1 := | |
((continuous_id.smul continuous_const).add continuous_const).continuous_within_at, | |
convert this.mem_closure _ _, | |
{ rw [one_smul, sub_add_cancel] }, | |
{ simp [closure_Ico (@zero_ne_one β _ _), zero_le_one] }, | |
{ rintros c β¨hc0, hc1β©, | |
rw [mem_ball, dist_eq_norm, add_sub_cancel, norm_smul, real.norm_eq_abs, | |
abs_of_nonneg hc0, mul_comm, β mul_one r], | |
rw [mem_closed_ball, dist_eq_norm] at hy, | |
replace hr : 0 < r, from ((norm_nonneg _).trans hy).lt_of_ne hr.symm, | |
apply mul_lt_mul'; assumption } | |
end | |
theorem frontier_ball [normed_space β E] (x : E) {r : β} (hr : r β 0) : | |
frontier (ball x r) = sphere x r := | |
begin | |
rw [frontier, closure_ball x hr, is_open_ball.interior_eq], | |
ext x, exact (@eq_iff_le_not_lt β _ _ _).symm | |
end | |
theorem interior_closed_ball [normed_space β E] (x : E) {r : β} (hr : r β 0) : | |
interior (closed_ball x r) = ball x r := | |
begin | |
cases hr.lt_or_lt with hr hr, | |
{ rw [closed_ball_eq_empty.2 hr, ball_eq_empty.2 hr.le, interior_empty] }, | |
refine subset.antisymm _ ball_subset_interior_closed_ball, | |
intros y hy, | |
rcases (mem_closed_ball.1 $ interior_subset hy).lt_or_eq with hr|rfl, { exact hr }, | |
set f : β β E := Ξ» c : β, c β’ (y - x) + x, | |
suffices : f β»ΒΉ' closed_ball x (dist y x) β Icc (-1) 1, | |
{ have hfc : continuous f := (continuous_id.smul continuous_const).add continuous_const, | |
have hf1 : (1:β) β f β»ΒΉ' (interior (closed_ball x $ dist y x)), by simpa [f], | |
have h1 : (1:β) β interior (Icc (-1:β) 1) := | |
interior_mono this (preimage_interior_subset_interior_preimage hfc hf1), | |
contrapose h1, | |
simp }, | |
intros c hc, | |
rw [mem_Icc, β abs_le, β real.norm_eq_abs, β mul_le_mul_right hr], | |
simpa [f, dist_eq_norm, norm_smul] using hc | |
end | |
theorem frontier_closed_ball [normed_space β E] (x : E) {r : β} (hr : r β 0) : | |
frontier (closed_ball x r) = sphere x r := | |
by rw [frontier, closure_closed_ball, interior_closed_ball x hr, | |
closed_ball_diff_ball] | |
/-- A (semi) normed real vector space is homeomorphic to the unit ball in the same space. | |
This homeomorphism sends `x : E` to `(1 + β₯xβ₯)β»ΒΉ β’ x`. | |
In many cases the actual implementation is not important, so we don't mark the projection lemmas | |
`homeomorph_unit_ball_apply_coe` and `homeomorph_unit_ball_symm_apply` as `@[simp]`. -/ | |
@[simps { attrs := [] }] | |
def homeomorph_unit_ball {E : Type*} [seminormed_add_comm_group E] [normed_space β E] : | |
E ββ ball (0 : E) 1 := | |
{ to_fun := Ξ» x, β¨(1 + β₯xβ₯)β»ΒΉ β’ x, begin | |
have : β₯xβ₯ < |1 + β₯xβ₯| := (lt_one_add _).trans_le (le_abs_self _), | |
rwa [mem_ball_zero_iff, norm_smul, real.norm_eq_abs, abs_inv, β div_eq_inv_mul, | |
div_lt_one ((norm_nonneg x).trans_lt this)], | |
endβ©, | |
inv_fun := Ξ» x, (1 - β₯(x : E)β₯)β»ΒΉ β’ (x : E), | |
left_inv := Ξ» x, | |
begin | |
have : 0 < 1 + β₯xβ₯ := (norm_nonneg x).trans_lt (lt_one_add _), | |
field_simp [this.ne', abs_of_pos this, norm_smul, smul_smul, abs_div] | |
end, | |
right_inv := Ξ» x, subtype.ext | |
begin | |
have : 0 < 1 - β₯(x : E)β₯ := sub_pos.2 (mem_ball_zero_iff.1 x.2), | |
field_simp [norm_smul, smul_smul, abs_div, abs_of_pos this, this.ne'] | |
end, | |
continuous_to_fun := continuous_subtype_mk _ $ | |
((continuous_const.add continuous_norm).invβ | |
(Ξ» x, ((norm_nonneg x).trans_lt (lt_one_add _)).ne')).smul continuous_id, | |
continuous_inv_fun := continuous.smul | |
((continuous_const.sub continuous_subtype_coe.norm).invβ $ | |
Ξ» x, (sub_pos.2 $ mem_ball_zero_iff.1 x.2).ne') continuous_subtype_coe } | |
open normed_field | |
instance : normed_space Ξ± (ulift E) := | |
{ norm_smul_le := Ξ» s x, (normed_space.norm_smul_le s x.down : _), | |
..ulift.normed_add_comm_group, | |
..ulift.module' } | |
/-- The product of two normed spaces is a normed space, with the sup norm. -/ | |
instance prod.normed_space : normed_space Ξ± (E Γ F) := | |
{ norm_smul_le := Ξ» s x, le_of_eq $ by simp [prod.norm_def, norm_smul, mul_max_of_nonneg], | |
..prod.normed_add_comm_group, | |
..prod.module } | |
/-- The product of finitely many normed spaces is a normed space, with the sup norm. -/ | |
instance pi.normed_space {E : ΞΉ β Type*} [fintype ΞΉ] [βi, seminormed_add_comm_group (E i)] | |
[βi, normed_space Ξ± (E i)] : normed_space Ξ± (Ξ i, E i) := | |
{ norm_smul_le := Ξ» a f, le_of_eq $ | |
show (β(finset.sup finset.univ (Ξ» (b : ΞΉ), β₯a β’ f bβ₯β)) : β) = | |
β₯aβ₯β * β(finset.sup finset.univ (Ξ» (b : ΞΉ), β₯f bβ₯β)), | |
by simp only [(nnreal.coe_mul _ _).symm, nnreal.mul_finset_sup, nnnorm_smul] } | |
/-- A subspace of a normed space is also a normed space, with the restriction of the norm. -/ | |
instance submodule.normed_space {π R : Type*} [has_smul π R] [normed_field π] [ring R] | |
{E : Type*} [seminormed_add_comm_group E] [normed_space π E] [module R E] | |
[is_scalar_tower π R E] (s : submodule R E) : | |
normed_space π s := | |
{ norm_smul_le := Ξ»c x, le_of_eq $ norm_smul c (x : E) } | |
/-- If there is a scalar `c` with `β₯cβ₯>1`, then any element with nonzero norm can be | |
moved by scalar multiplication to any shell of width `β₯cβ₯`. Also recap information on the norm of | |
the rescaling element that shows up in applications. -/ | |
lemma rescale_to_shell_semi_normed {c : Ξ±} (hc : 1 < β₯cβ₯) {Ξ΅ : β} (Ξ΅pos : 0 < Ξ΅) {x : E} | |
(hx : β₯xβ₯ β 0) : βd:Ξ±, d β 0 β§ β₯d β’ xβ₯ < Ξ΅ β§ (Ξ΅/β₯cβ₯ β€ β₯d β’ xβ₯) β§ (β₯dβ₯β»ΒΉ β€ Ξ΅β»ΒΉ * β₯cβ₯ * β₯xβ₯) := | |
begin | |
have xΞ΅pos : 0 < β₯xβ₯/Ξ΅ := div_pos ((ne.symm hx).le_iff_lt.1 (norm_nonneg x)) Ξ΅pos, | |
rcases exists_mem_Ico_zpow xΞ΅pos hc with β¨n, hnβ©, | |
have cpos : 0 < β₯cβ₯ := lt_trans (zero_lt_one : (0 :β) < 1) hc, | |
have cnpos : 0 < β₯c^(n+1)β₯ := by { rw norm_zpow, exact lt_trans xΞ΅pos hn.2 }, | |
refine β¨(c^(n+1))β»ΒΉ, _, _, _, _β©, | |
show (c ^ (n + 1))β»ΒΉ β 0, | |
by rwa [ne.def, inv_eq_zero, β ne.def, β norm_pos_iff], | |
show β₯(c ^ (n + 1))β»ΒΉ β’ xβ₯ < Ξ΅, | |
{ rw [norm_smul, norm_inv, β div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow], | |
exact (div_lt_iff Ξ΅pos).1 (hn.2) }, | |
show Ξ΅ / β₯cβ₯ β€ β₯(c ^ (n + 1))β»ΒΉ β’ xβ₯, | |
{ rw [div_le_iff cpos, norm_smul, norm_inv, norm_zpow, zpow_addβ (ne_of_gt cpos), | |
zpow_one, mul_inv_rev, mul_comm, β mul_assoc, β mul_assoc, mul_inv_cancel (ne_of_gt cpos), | |
one_mul, β div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm], | |
exact (le_div_iff Ξ΅pos).1 hn.1 }, | |
show β₯(c ^ (n + 1))β»ΒΉβ₯β»ΒΉ β€ Ξ΅β»ΒΉ * β₯cβ₯ * β₯xβ₯, | |
{ have : Ξ΅β»ΒΉ * β₯cβ₯ * β₯xβ₯ = Ξ΅β»ΒΉ * β₯xβ₯ * β₯cβ₯, by ring, | |
rw [norm_inv, inv_inv, norm_zpow, zpow_addβ (ne_of_gt cpos), zpow_one, this, β div_eq_inv_mul], | |
exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) } | |
end | |
end seminormed_add_comm_group | |
section normed_add_comm_group | |
variables [normed_field Ξ±] | |
variables {E : Type*} [normed_add_comm_group E] [normed_space Ξ± E] | |
variables {F : Type*} [normed_add_comm_group F] [normed_space Ξ± F] | |
open normed_field | |
/-- While this may appear identical to `normed_space.to_module`, it contains an implicit argument | |
involving `normed_add_comm_group.to_seminormed_add_comm_group` that typeclass inference has trouble | |
inferring. | |
Specifically, the following instance cannot be found without this `normed_space.to_module'`: | |
```lean | |
example | |
(π ΞΉ : Type*) (E : ΞΉ β Type*) | |
[normed_field π] [Ξ i, normed_add_comm_group (E i)] [Ξ i, normed_space π (E i)] : | |
Ξ i, module π (E i) := by apply_instance | |
``` | |
[This Zulip thread](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/Typeclass.20resolution.20under.20binders/near/245151099) | |
gives some more context. -/ | |
@[priority 100] | |
instance normed_space.to_module' : module Ξ± F := normed_space.to_module | |
section surj | |
variables (E) [normed_space β E] [nontrivial E] | |
lemma exists_norm_eq {c : β} (hc : 0 β€ c) : β x : E, β₯xβ₯ = c := | |
begin | |
rcases exists_ne (0 : E) with β¨x, hxβ©, | |
rw β norm_ne_zero_iff at hx, | |
use c β’ β₯xβ₯β»ΒΉ β’ x, | |
simp [norm_smul, real.norm_of_nonneg hc, hx] | |
end | |
@[simp] lemma range_norm : range (norm : E β β) = Ici 0 := | |
subset.antisymm (range_subset_iff.2 norm_nonneg) (Ξ» _, exists_norm_eq E) | |
lemma nnnorm_surjective : surjective (nnnorm : E β ββ₯0) := | |
Ξ» c, (exists_norm_eq E c.coe_nonneg).imp $ Ξ» x h, nnreal.eq h | |
@[simp] lemma range_nnnorm : range (nnnorm : E β ββ₯0) = univ := | |
(nnnorm_surjective E).range_eq | |
end surj | |
theorem interior_closed_ball' [normed_space β E] [nontrivial E] (x : E) (r : β) : | |
interior (closed_ball x r) = ball x r := | |
begin | |
rcases eq_or_ne r 0 with rfl|hr, | |
{ rw [closed_ball_zero, ball_zero, interior_singleton] }, | |
{ exact interior_closed_ball x hr } | |
end | |
theorem frontier_closed_ball' [normed_space β E] [nontrivial E] (x : E) (r : β) : | |
frontier (closed_ball x r) = sphere x r := | |
by rw [frontier, closure_closed_ball, interior_closed_ball' x r, closed_ball_diff_ball] | |
variables {Ξ±} | |
/-- If there is a scalar `c` with `β₯cβ₯>1`, then any element can be moved by scalar multiplication to | |
any shell of width `β₯cβ₯`. Also recap information on the norm of the rescaling element that shows | |
up in applications. -/ | |
lemma rescale_to_shell {c : Ξ±} (hc : 1 < β₯cβ₯) {Ξ΅ : β} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : x β 0) : | |
βd:Ξ±, d β 0 β§ β₯d β’ xβ₯ < Ξ΅ β§ (Ξ΅/β₯cβ₯ β€ β₯d β’ xβ₯) β§ (β₯dβ₯β»ΒΉ β€ Ξ΅β»ΒΉ * β₯cβ₯ * β₯xβ₯) := | |
rescale_to_shell_semi_normed hc Ξ΅pos (ne_of_lt (norm_pos_iff.2 hx)).symm | |
end normed_add_comm_group | |
section nontrivially_normed_space | |
variables (π E : Type*) [nontrivially_normed_field π] [normed_add_comm_group E] [normed_space π E] | |
[nontrivial E] | |
include π | |
/-- If `E` is a nontrivial normed space over a nontrivially normed field `π`, then `E` is unbounded: | |
for any `c : β`, there exists a vector `x : E` with norm strictly greater than `c`. -/ | |
lemma normed_space.exists_lt_norm (c : β) : β x : E, c < β₯xβ₯ := | |
begin | |
rcases exists_ne (0 : E) with β¨x, hxβ©, | |
rcases normed_field.exists_lt_norm π (c / β₯xβ₯) with β¨r, hrβ©, | |
use r β’ x, | |
rwa [norm_smul, β div_lt_iff], | |
rwa norm_pos_iff | |
end | |
protected lemma normed_space.unbounded_univ : Β¬bounded (univ : set E) := | |
Ξ» h, let β¨R, hRβ© := bounded_iff_forall_norm_le.1 h, β¨x, hxβ© := normed_space.exists_lt_norm π E R | |
in hx.not_le (hR x trivial) | |
/-- A normed vector space over a nontrivially normed field is a noncompact space. This cannot be | |
an instance because in order to apply it, Lean would have to search for `normed_space π E` with | |
unknown `π`. We register this as an instance in two cases: `π = E` and `π = β`. -/ | |
protected lemma normed_space.noncompact_space : noncompact_space E := | |
β¨Ξ» h, normed_space.unbounded_univ π _ h.boundedβ© | |
@[priority 100] | |
instance nontrivially_normed_field.noncompact_space : noncompact_space π := | |
normed_space.noncompact_space π π | |
omit π | |
@[priority 100] | |
instance real_normed_space.noncompact_space [normed_space β E] : noncompact_space E := | |
normed_space.noncompact_space β E | |
end nontrivially_normed_space | |
section normed_algebra | |
/-- A normed algebra `π'` over `π` is normed module that is also an algebra. | |
See the implementation notes for `algebra` for a discussion about non-unital algebras. Following | |
the strategy there, a non-unital *normed* algebra can be written as: | |
```lean | |
variables [normed_field π] [non_unital_semi_normed_ring π'] | |
variables [normed_module π π'] [smul_comm_class π π' π'] [is_scalar_tower π π' π'] | |
``` | |
-/ | |
class normed_algebra (π : Type*) (π' : Type*) [normed_field π] [semi_normed_ring π'] | |
extends algebra π π' := | |
(norm_smul_le : β (r : π) (x : π'), β₯r β’ xβ₯ β€ β₯rβ₯ * β₯xβ₯) | |
variables {π : Type*} (π' : Type*) [normed_field π] [semi_normed_ring π'] [normed_algebra π π'] | |
@[priority 100] | |
instance normed_algebra.to_normed_space : normed_space π π' := | |
{ norm_smul_le := normed_algebra.norm_smul_le } | |
/-- While this may appear identical to `normed_algebra.to_normed_space`, it contains an implicit | |
argument involving `normed_ring.to_semi_normed_ring` that typeclass inference has trouble inferring. | |
Specifically, the following instance cannot be found without this `normed_space.to_module'`: | |
```lean | |
example | |
(π ΞΉ : Type*) (E : ΞΉ β Type*) | |
[normed_field π] [Ξ i, normed_ring (E i)] [Ξ i, normed_algebra π (E i)] : | |
Ξ i, module π (E i) := by apply_instance | |
``` | |
See `normed_space.to_module'` for a similar situation. -/ | |
@[priority 100] | |
instance normed_algebra.to_normed_space' {π'} [normed_ring π'] [normed_algebra π π'] : | |
normed_space π π' := by apply_instance | |
lemma norm_algebra_map (x : π) : β₯algebra_map π π' xβ₯ = β₯xβ₯ * β₯(1 : π')β₯ := | |
begin | |
rw algebra.algebra_map_eq_smul_one, | |
exact norm_smul _ _, | |
end | |
lemma nnnorm_algebra_map (x : π) : β₯algebra_map π π' xβ₯β = β₯xβ₯β * β₯(1 : π')β₯β := | |
subtype.ext $ norm_algebra_map π' x | |
@[simp] lemma norm_algebra_map' [norm_one_class π'] (x : π) : β₯algebra_map π π' xβ₯ = β₯xβ₯ := | |
by rw [norm_algebra_map, norm_one, mul_one] | |
@[simp] lemma nnnorm_algebra_map' [norm_one_class π'] (x : π) : β₯algebra_map π π' xβ₯β = β₯xβ₯β := | |
subtype.ext $ norm_algebra_map' _ _ | |
variables (π π') | |
/-- In a normed algebra, the inclusion of the base field in the extended field is an isometry. -/ | |
lemma algebra_map_isometry [norm_one_class π'] : isometry (algebra_map π π') := | |
begin | |
refine isometry.of_dist_eq (Ξ»x y, _), | |
rw [dist_eq_norm, dist_eq_norm, β ring_hom.map_sub, norm_algebra_map'], | |
end | |
/-- The inclusion of the base field in a normed algebra as a continuous linear map. -/ | |
@[simps] | |
def algebra_map_clm : π βL[π] π' := | |
{ to_fun := algebra_map π π', | |
map_add' := (algebra_map π π').map_add, | |
map_smul' := Ξ» r x, by rw [algebra.id.smul_eq_mul, map_mul, ring_hom.id_apply, algebra.smul_def], | |
cont := | |
have lipschitz_with β₯(1 : π')β₯β (algebra_map π π') := Ξ» x y, begin | |
rw [edist_eq_coe_nnnorm_sub, edist_eq_coe_nnnorm_sub, βmap_sub, βennreal.coe_mul, | |
ennreal.coe_le_coe, mul_comm], | |
exact (nnnorm_algebra_map _ _).le, | |
end, this.continuous } | |
lemma algebra_map_clm_coe : | |
(algebra_map_clm π π' : π β π') = (algebra_map π π' : π β π') := rfl | |
lemma algebra_map_clm_to_linear_map : | |
(algebra_map_clm π π').to_linear_map = algebra.linear_map π π' := rfl | |
instance normed_algebra.id : normed_algebra π π := | |
{ .. normed_field.to_normed_space, | |
.. algebra.id π} | |
/-- Any normed characteristic-zero division ring that is a normed_algebra over the reals is also a | |
normed algebra over the rationals. | |
Phrased another way, if `π` is a normed algebra over the reals, then `algebra_rat` respects that | |
norm. -/ | |
instance normed_algebra_rat {π} [normed_division_ring π] [char_zero π] [normed_algebra β π] : | |
normed_algebra β π := | |
{ norm_smul_le := Ξ» q x, | |
by rw [βsmul_one_smul β q x, rat.smul_one_eq_coe, norm_smul, rat.norm_cast_real], } | |
instance punit.normed_algebra : normed_algebra π punit := | |
{ norm_smul_le := Ξ» q x, by simp only [punit.norm_eq_zero, mul_zero] } | |
instance : normed_algebra π (ulift π') := | |
{ ..ulift.normed_space } | |
/-- The product of two normed algebras is a normed algebra, with the sup norm. -/ | |
instance prod.normed_algebra {E F : Type*} [semi_normed_ring E] [semi_normed_ring F] | |
[normed_algebra π E] [normed_algebra π F] : | |
normed_algebra π (E Γ F) := | |
{ ..prod.normed_space } | |
/-- The product of finitely many normed algebras is a normed algebra, with the sup norm. -/ | |
instance pi.normed_algebra {E : ΞΉ β Type*} [fintype ΞΉ] | |
[Ξ i, semi_normed_ring (E i)] [Ξ i, normed_algebra π (E i)] : | |
normed_algebra π (Ξ i, E i) := | |
{ .. pi.normed_space, | |
.. pi.algebra _ E } | |
end normed_algebra | |
section restrict_scalars | |
variables (π : Type*) (π' : Type*) [normed_field π] [normed_field π'] [normed_algebra π π'] | |
(E : Type*) [seminormed_add_comm_group E] [normed_space π' E] | |
instance {π : Type*} {π' : Type*} {E : Type*} [I : seminormed_add_comm_group E] : | |
seminormed_add_comm_group (restrict_scalars π π' E) := I | |
instance {π : Type*} {π' : Type*} {E : Type*} [I : normed_add_comm_group E] : | |
normed_add_comm_group (restrict_scalars π π' E) := I | |
/-- If `E` is a normed space over `π'` and `π` is a normed algebra over `π'`, then | |
`restrict_scalars.module` is additionally a `normed_space`. -/ | |
instance : normed_space π (restrict_scalars π π' E) := | |
{ norm_smul_le := Ξ» c x, (normed_space.norm_smul_le (algebra_map π π' c) (_ : E)).trans_eq $ | |
by rw norm_algebra_map', | |
..restrict_scalars.module π π' E } | |
/-- | |
The action of the original normed_field on `restrict_scalars π π' E`. | |
This is not an instance as it would be contrary to the purpose of `restrict_scalars`. | |
-/ | |
-- If you think you need this, consider instead reproducing `restrict_scalars.lsmul` | |
-- appropriately modified here. | |
def module.restrict_scalars.normed_space_orig {π : Type*} {π' : Type*} {E : Type*} | |
[normed_field π'] [seminormed_add_comm_group E] [I : normed_space π' E] : | |
normed_space π' (restrict_scalars π π' E) := I | |
/-- Warning: This declaration should be used judiciously. | |
Please consider using `is_scalar_tower` and/or `restrict_scalars π π' E` instead. | |
This definition allows the `restrict_scalars.normed_space` instance to be put directly on `E` | |
rather on `restrict_scalars π π' E`. This would be a very bad instance; both because `π'` cannot be | |
inferred, and because it is likely to create instance diamonds. | |
-/ | |
def normed_space.restrict_scalars : normed_space π E := | |
restrict_scalars.normed_space _ π' _ | |
end restrict_scalars | |