Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
100K - 1M
License:
/- | |
Copyright (c) 2019 Jean Lo. All rights reserved. | |
Released under Apache 2.0 license as described in the file LICENSE. | |
Authors: Jean Lo, YaΓ«l Dillies, Moritz Doll | |
-/ | |
import analysis.locally_convex.basic | |
import data.real.pointwise | |
import data.real.sqrt | |
import topology.algebra.filter_basis | |
import topology.algebra.module.locally_convex | |
/-! | |
# Seminorms | |
This file defines seminorms. | |
A seminorm is a function to the reals which is positive-semidefinite, absolutely homogeneous, and | |
subadditive. They are closely related to convex sets and a topological vector space is locally | |
convex if and only if its topology is induced by a family of seminorms. | |
## Main declarations | |
For an addditive group: | |
* `add_group_seminorm`: A function `f` from an add_group `G` to the reals that preserves zero, | |
takes nonnegative values, is subadditive and such that `f (-x) = f x` for all `x β G`. | |
For a module over a normed ring: | |
* `seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and | |
subadditive. | |
* `norm_seminorm π E`: The norm on `E` as a seminorm. | |
## References | |
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966] | |
## Tags | |
seminorm, locally convex, LCTVS | |
-/ | |
set_option old_structure_cmd true | |
open normed_field set | |
open_locale big_operators nnreal pointwise topological_space | |
variables {R R' π E F G ΞΉ : Type*} | |
/-- A seminorm on an add_group `G` is a function A function `f : G β β` that preserves zero, takes | |
nonnegative values, is subadditive and such that `f (-x) = f x` for all `x β G`. -/ | |
structure add_group_seminorm (G : Type*) [add_group G] | |
extends zero_hom G β := | |
(nonneg' : β r, 0 β€ to_fun r) | |
(add_le' : β r s, to_fun (r + s) β€ to_fun r + to_fun s) | |
(neg' : β r, to_fun (- r) = to_fun r) | |
attribute [nolint doc_blame] add_group_seminorm.to_zero_hom | |
namespace add_group_seminorm | |
variables [add_group E] | |
instance zero_hom_class : zero_hom_class (add_group_seminorm E) E β := | |
{ coe := Ξ» f, f.to_fun, | |
coe_injective' := Ξ» f g h, by cases f; cases g; congr', | |
map_zero := Ξ» f, f.map_zero' } | |
/-- Helper instance for when there's too many metavariables to apply `fun_like.has_coe_to_fun`. -/ | |
instance : has_coe_to_fun (add_group_seminorm E) (Ξ» _, E β β) := β¨Ξ» p, p.to_funβ© | |
@[ext] lemma ext {p q : add_group_seminorm E} (h : β x, (p : E β β) x = q x) : p = q := | |
fun_like.ext p q h | |
instance : has_zero (add_group_seminorm E) := | |
β¨{ to_fun := 0, | |
nonneg' := Ξ» r, le_refl _, | |
map_zero' := pi.zero_apply _, | |
add_le' := Ξ» _ _, eq.ge (zero_add _), | |
neg' := Ξ» x, rfl}β© | |
@[simp] lemma coe_zero : β(0 : add_group_seminorm E) = 0 := rfl | |
@[simp] lemma zero_apply (x : E) : (0 : add_group_seminorm E) x = 0 := rfl | |
instance : inhabited (add_group_seminorm E) := β¨0β© | |
variables (p : add_group_seminorm E) (x y : E) (r : β) | |
protected lemma nonneg : 0 β€ p x := p.nonneg' _ | |
@[simp] protected lemma map_zero : p 0 = 0 := p.map_zero' | |
protected lemma add_le : p (x + y) β€ p x + p y := p.add_le' _ _ | |
@[simp] protected lemma neg : p (- x) = p x := p.neg' _ | |
/-- Any action on `β` which factors through `ββ₯0` applies to an `add_group_seminorm`. -/ | |
instance [has_smul R β] [has_smul R ββ₯0] [is_scalar_tower R ββ₯0 β] : | |
has_smul R (add_group_seminorm E) := | |
{ smul := Ξ» r p, | |
{ to_fun := Ξ» x, r β’ p x, | |
nonneg' := Ξ» x, begin | |
simp only [βsmul_one_smul ββ₯0 r (_ : β), nnreal.smul_def, smul_eq_mul], | |
exact mul_nonneg (nnreal.coe_nonneg _) (p.nonneg _) | |
end, | |
map_zero' := by simp only [βsmul_one_smul ββ₯0 r (_ : β), nnreal.smul_def, smul_eq_mul, | |
p.map_zero, mul_zero], | |
add_le' := Ξ» _ _, begin | |
simp only [βsmul_one_smul ββ₯0 r (_ : β), nnreal.smul_def, smul_eq_mul], | |
exact (mul_le_mul_of_nonneg_left (p.add_le _ _) (nnreal.coe_nonneg _)).trans_eq | |
(mul_add _ _ _), | |
end, | |
neg' := Ξ» x, by rw p.neg }} | |
instance [has_smul R β] [has_smul R ββ₯0] [is_scalar_tower R ββ₯0 β] | |
[has_smul R' β] [has_smul R' ββ₯0] [is_scalar_tower R' ββ₯0 β] | |
[has_smul R R'] [is_scalar_tower R R' β] : | |
is_scalar_tower R R' (add_group_seminorm E) := | |
{ smul_assoc := Ξ» r a p, ext $ Ξ» x, smul_assoc r a (p x) } | |
@[simp] lemma coe_smul [has_smul R β] [has_smul R ββ₯0] [is_scalar_tower R ββ₯0 β] | |
(r : R) (p : add_group_seminorm E) : β(r β’ p) = r β’ p := rfl | |
@[simp] lemma smul_apply [has_smul R β] [has_smul R ββ₯0] [is_scalar_tower R ββ₯0 β] | |
(r : R) (p : add_group_seminorm E) (x : E) : (r β’ p) x = r β’ p x := rfl | |
instance : has_add (add_group_seminorm E) := | |
{ add := Ξ» p q, | |
{ to_fun := Ξ» x, p x + q x, | |
nonneg' := Ξ» x, add_nonneg (p.nonneg _) (q.nonneg _), | |
map_zero' := by rw [p.map_zero, q.map_zero, zero_add], | |
add_le' := Ξ» _ _, has_le.le.trans_eq (add_le_add (p.add_le _ _) (q.add_le _ _)) | |
(add_add_add_comm _ _ _ _), | |
neg' := Ξ» x, by rw [p.neg, q.neg] }} | |
@[simp] lemma coe_add (p q : add_group_seminorm E) : β(p + q) = p + q := rfl | |
@[simp] lemma add_apply (p q : add_group_seminorm E) (x : E) : (p + q) x = p x + q x := rfl | |
-- TODO: define `has_Sup` too, from the skeleton at | |
-- https://github.com/leanprover-community/mathlib/pull/11329#issuecomment-1008915345 | |
noncomputable instance : has_sup (add_group_seminorm E) := | |
{ sup := Ξ» p q, | |
{ to_fun := p β q, | |
nonneg' := Ξ» x, begin | |
simp only [pi.sup_apply, le_sup_iff], | |
exact or.intro_left _ (p.nonneg _), | |
end, | |
map_zero' := begin | |
simp only [pi.sup_apply], | |
rw [β p.map_zero, sup_eq_left, p.map_zero, q.map_zero], | |
end, | |
add_le' := Ξ» x y, sup_le | |
((p.add_le x y).trans $ add_le_add le_sup_left le_sup_left) | |
((q.add_le x y).trans $ add_le_add le_sup_right le_sup_right), | |
neg' := Ξ» x, by rw [pi.sup_apply, pi.sup_apply, p.neg, q.neg] }} | |
@[simp] lemma coe_sup (p q : add_group_seminorm E) : β(p β q) = p β q := rfl | |
lemma sup_apply (p q : add_group_seminorm E) (x : E) : (p β q) x = p x β q x := rfl | |
lemma smul_sup [has_smul R β] [has_smul R ββ₯0] [is_scalar_tower R ββ₯0 β] | |
(r : R) (p q : add_group_seminorm E) : | |
r β’ (p β q) = r β’ p β r β’ q := | |
have real.smul_max : β x y : β, r β’ max x y = max (r β’ x) (r β’ y), | |
from Ξ» x y, by simpa only [βsmul_eq_mul, βnnreal.smul_def, smul_one_smul ββ₯0 r (_ : β)] | |
using mul_max_of_nonneg x y (r β’ 1 : ββ₯0).prop, | |
ext $ Ξ» x, real.smul_max _ _ | |
instance : partial_order (add_group_seminorm E) := partial_order.lift _ fun_like.coe_injective | |
lemma le_def (p q : add_group_seminorm E) : p β€ q β (p : E β β) β€ q := iff.rfl | |
lemma lt_def (p q : add_group_seminorm E) : p < q β (p : E β β) < q := iff.rfl | |
noncomputable instance : semilattice_sup (add_group_seminorm E) := | |
function.injective.semilattice_sup _ fun_like.coe_injective coe_sup | |
section add_comm_group | |
variable [add_comm_group G] | |
variables (q : add_group_seminorm G) | |
protected lemma sub_le (x y : G) : q (x - y) β€ q x + q y := | |
calc | |
q (x - y) | |
= q (x + -y) : by rw sub_eq_add_neg | |
... β€ q x + q (-y) : q.add_le x (-y) | |
... = q x + q y : by rw q.neg | |
lemma sub_rev (x y : G) : q (x - y) = q (y - x) := | |
by rw [βneg_sub, q.neg] | |
/-- The direct path from 0 to y is shorter than the path with x "inserted" in between. -/ | |
lemma le_insert (x y : G) : q y β€ q x + q (x - y) := | |
calc q y = q (x - (x - y)) : by rw sub_sub_cancel | |
... β€ q x + q (x - y) : q.sub_le _ _ | |
/-- The direct path from 0 to x is shorter than the path with y "inserted" in between. -/ | |
lemma le_insert' (x y : G) : q x β€ q y + q (x - y) := | |
by { rw sub_rev, exact le_insert _ _ _ } | |
private lemma bdd_below_range_add (x : G) (p q : add_group_seminorm G) : | |
bdd_below (range (Ξ» (u : G), p u + q (x - u))) := | |
by { use 0, rintro _ β¨x, rflβ©, exact add_nonneg (p.nonneg _) (q.nonneg _) } | |
noncomputable instance : has_inf (add_group_seminorm G) := | |
{ inf := Ξ» p q, | |
{ to_fun := Ξ» x, β¨ u : G, p u + q (x-u), | |
map_zero' := cinfi_eq_of_forall_ge_of_forall_gt_exists_lt | |
(Ξ» x, add_nonneg (p.nonneg _) (q.nonneg _)) | |
(Ξ» r hr, β¨0, by simpa [sub_zero, p.map_zero, q.map_zero, add_zero] using hrβ©), | |
nonneg' := Ξ» x, le_cinfi (Ξ» x, add_nonneg (p.nonneg _) (q.nonneg _)), | |
add_le' := Ξ» x y, begin | |
refine le_cinfi_add_cinfi (Ξ» u v, _), | |
apply cinfi_le_of_le (bdd_below_range_add _ _ _) (v+u), dsimp only, | |
convert add_le_add (p.add_le v u) (q.add_le (y-v) (x-u)) using 1, | |
{ rw show x + y - (v + u) = y - v + (x - u), by abel }, | |
{ abel }, | |
end, | |
neg' := Ξ» x, begin | |
have : (β¨ (u : G), p u + q (x - u) : β) = β¨ (u : G), p (- u) + q (x + u), | |
{ apply function.surjective.infi_congr (Ξ» (x : G), -x) neg_surjective, | |
{ intro u, | |
simp only [neg_neg, add_right_inj, sub_eq_add_neg] }}, | |
rw this, | |
apply congr_arg, | |
ext u, | |
rw [p.neg, sub_eq_add_neg, β neg_add_rev, add_comm u, q.neg], | |
end }} | |
@[simp] lemma inf_apply (p q : add_group_seminorm G) (x : G) : | |
(p β q) x = β¨ u : G, p u + q (x-u) := rfl | |
noncomputable instance : lattice (add_group_seminorm G) := | |
{ inf := (β), | |
inf_le_left := Ξ» p q x, begin | |
apply cinfi_le_of_le (bdd_below_range_add _ _ _) x, | |
simp only [sub_self, map_zero, add_zero], | |
end, | |
inf_le_right := Ξ» p q x, begin | |
apply cinfi_le_of_le (bdd_below_range_add _ _ _) (0:G), | |
simp only [sub_self, map_zero, zero_add, sub_zero], | |
end, | |
le_inf := Ξ» a b c hab hac x, | |
le_cinfi $ Ξ» u, le_trans (a.le_insert' _ _) (add_le_add (hab _) (hac _)), | |
..add_group_seminorm.semilattice_sup } | |
end add_comm_group | |
section comp | |
variables [add_group F] [add_group G] | |
/-- Composition of an add_group_seminorm with an add_monoid_hom is an add_group_seminorm. -/ | |
def comp (p : add_group_seminorm F) (f : E β+ F) : add_group_seminorm E := | |
{ to_fun := Ξ» x, p (f x), | |
nonneg' := Ξ» x, p.nonneg _, | |
map_zero' := by rw [f.map_zero, p.map_zero], | |
add_le' := Ξ» _ _, by apply eq.trans_le (congr_arg p (f.map_add _ _)) (p.add_le _ _), | |
neg' := Ξ» x, by rw [map_neg, p.neg] } | |
@[simp] lemma coe_comp (p : add_group_seminorm F) (f : E β+ F) : β(p.comp f) = p β f := rfl | |
@[simp] lemma comp_apply (p : add_group_seminorm F) (f : E β+ F) (x : E) : | |
(p.comp f) x = p (f x) := rfl | |
@[simp] lemma comp_id (p : add_group_seminorm E) : p.comp (add_monoid_hom.id _) = p := | |
ext $ Ξ» _, rfl | |
@[simp] lemma comp_zero (p : add_group_seminorm F) : p.comp (0 : E β+ F) = 0 := | |
ext $ Ξ» _, map_zero p | |
@[simp] lemma zero_comp (f : E β+ F) : (0 : add_group_seminorm F).comp f = 0 := | |
ext $ Ξ» _, rfl | |
lemma comp_comp (p : add_group_seminorm G) (g : F β+ G) (f : E β+ F) : | |
p.comp (g.comp f) = (p.comp g).comp f := | |
ext $ Ξ» _, rfl | |
lemma add_comp (p q : add_group_seminorm F) (f : E β+ F) : (p + q).comp f = p.comp f + q.comp f := | |
ext $ Ξ» _, rfl | |
lemma comp_add_le {A B : Type*} [add_comm_group A] [add_comm_group B] | |
(p : add_group_seminorm B) (f g : A β+ B) : p.comp (f + g) β€ p.comp f + p.comp g := | |
Ξ» _, p.add_le _ _ | |
lemma comp_mono {p : add_group_seminorm F} {q : add_group_seminorm F} (f : E β+ F) (hp : p β€ q) : | |
p.comp f β€ q.comp f := Ξ» _, hp _ | |
end comp | |
end add_group_seminorm | |
/-- A seminorm on a module over a normed ring is a function to the reals that is positive | |
semidefinite, positive homogeneous, and subadditive. -/ | |
structure seminorm (π : Type*) (E : Type*) [semi_normed_ring π] [add_group E] [has_smul π E] | |
extends add_group_seminorm E := | |
(smul' : β (a : π) (x : E), to_fun (a β’ x) = β₯aβ₯ * to_fun x) | |
attribute [nolint doc_blame] seminorm.to_add_group_seminorm | |
private lemma map_zero.of_smul {π : Type*} {E : Type*} [semi_normed_ring π] [add_group E] | |
[smul_with_zero π E] {f : E β β} (smul : β (a : π) (x : E), f (a β’ x) = β₯aβ₯ * f x) : f 0 = 0 := | |
calc f 0 = f ((0 : π) β’ 0) : by rw zero_smul | |
... = 0 : by rw [smul, norm_zero, zero_mul] | |
private lemma neg.of_smul {π : Type*} {E : Type*} [semi_normed_ring π] [add_comm_group E] | |
[module π E] {f : E β β} (smul : β (a : π) (x : E), f (a β’ x) = β₯aβ₯ * f x) (x : E) : | |
f (-x) = f x := | |
by rw [βneg_one_smul π, smul, norm_neg, β smul, one_smul] | |
private lemma nonneg.of {π : Type*} {E : Type*} [semi_normed_ring π] [add_comm_group E] [module π E] | |
{f : E β β} (add_le : β (x y : E), f (x + y) β€ f x + f y) | |
(smul : β (a : π) (x : E), f (a β’ x) = β₯aβ₯ * f x) (x : E) : 0 β€ f x := | |
have h: 0 β€ 2 * f x, from | |
calc 0 = f (x + (- x)) : by rw [add_neg_self, map_zero.of_smul smul] | |
... β€ f x + f (-x) : add_le _ _ | |
... = 2 * f x : by rw [neg.of_smul smul, two_mul], | |
nonneg_of_mul_nonneg_right h zero_lt_two | |
/-- Alternative constructor for a `seminorm` on an `add_comm_group E` that is a module over a | |
`semi_norm_ring π`. -/ | |
def seminorm.of {π : Type*} {E : Type*} [semi_normed_ring π] [add_comm_group E] [module π E] | |
(f : E β β) (add_le : β (x y : E), f (x + y) β€ f x + f y) | |
(smul : β (a : π) (x : E), f (a β’ x) = β₯aβ₯ * f x) : seminorm π E := | |
{ to_fun := f, | |
map_zero' := map_zero.of_smul smul, | |
nonneg' := nonneg.of add_le smul, | |
add_le' := add_le, | |
smul' := smul, | |
neg' := neg.of_smul smul } | |
namespace seminorm | |
section semi_normed_ring | |
variables [semi_normed_ring π] | |
section add_group | |
variables [add_group E] | |
section has_smul | |
variables [has_smul π E] | |
instance zero_hom_class : zero_hom_class (seminorm π E) E β := | |
{ coe := Ξ» f, f.to_fun, | |
coe_injective' := Ξ» f g h, by cases f; cases g; congr', | |
map_zero := Ξ» f, f.map_zero' } | |
/-- Helper instance for when there's too many metavariables to apply `fun_like.has_coe_to_fun`. -/ | |
instance : has_coe_to_fun (seminorm π E) (Ξ» _, E β β) := β¨Ξ» p, p.to_funβ© | |
@[ext] lemma ext {p q : seminorm π E} (h : β x, (p : E β β) x = q x) : p = q := fun_like.ext p q h | |
instance : has_zero (seminorm π E) := | |
β¨{ smul' := Ξ» _ _, (mul_zero _).symm, | |
..add_group_seminorm.has_zero.zero }β© | |
@[simp] lemma coe_zero : β(0 : seminorm π E) = 0 := rfl | |
@[simp] lemma zero_apply (x : E) : (0 : seminorm π E) x = 0 := rfl | |
instance : inhabited (seminorm π E) := β¨0β© | |
variables (p : seminorm π E) (c : π) (x y : E) (r : β) | |
protected lemma nonneg : 0 β€ p x := p.nonneg' _ | |
protected lemma map_zero : p 0 = 0 := p.map_zero' | |
protected lemma smul : p (c β’ x) = β₯cβ₯ * p x := p.smul' _ _ | |
protected lemma add_le : p (x + y) β€ p x + p y := p.add_le' _ _ | |
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/ | |
instance [has_smul R β] [has_smul R ββ₯0] [is_scalar_tower R ββ₯0 β] : | |
has_smul R (seminorm π E) := | |
{ smul := Ξ» r p, | |
{ to_fun := Ξ» x, r β’ p x, | |
smul' := Ξ» _ _, begin | |
simp only [βsmul_one_smul ββ₯0 r (_ : β), nnreal.smul_def, smul_eq_mul], | |
rw [p.smul, mul_left_comm], | |
end, | |
..(r β’ p.to_add_group_seminorm) }} | |
instance [has_smul R β] [has_smul R ββ₯0] [is_scalar_tower R ββ₯0 β] | |
[has_smul R' β] [has_smul R' ββ₯0] [is_scalar_tower R' ββ₯0 β] | |
[has_smul R R'] [is_scalar_tower R R' β] : | |
is_scalar_tower R R' (seminorm π E) := | |
{ smul_assoc := Ξ» r a p, ext $ Ξ» x, smul_assoc r a (p x) } | |
lemma coe_smul [has_smul R β] [has_smul R ββ₯0] [is_scalar_tower R ββ₯0 β] | |
(r : R) (p : seminorm π E) : β(r β’ p) = r β’ p := rfl | |
@[simp] lemma smul_apply [has_smul R β] [has_smul R ββ₯0] [is_scalar_tower R ββ₯0 β] | |
(r : R) (p : seminorm π E) (x : E) : (r β’ p) x = r β’ p x := rfl | |
instance : has_add (seminorm π E) := | |
{ add := Ξ» p q, | |
{ to_fun := Ξ» x, p x + q x, | |
smul' := Ξ» a x, by simp only [p.smul, q.smul, mul_add], | |
..(p.to_add_group_seminorm + q.to_add_group_seminorm) }} | |
lemma coe_add (p q : seminorm π E) : β(p + q) = p + q := rfl | |
@[simp] lemma add_apply (p q : seminorm π E) (x : E) : (p + q) x = p x + q x := rfl | |
instance : add_monoid (seminorm π E) := | |
fun_like.coe_injective.add_monoid _ rfl coe_add (Ξ» p n, coe_smul n p) | |
instance : ordered_cancel_add_comm_monoid (seminorm π E) := | |
fun_like.coe_injective.ordered_cancel_add_comm_monoid _ rfl coe_add (Ξ» p n, coe_smul n p) | |
instance [monoid R] [mul_action R β] [has_smul R ββ₯0] [is_scalar_tower R ββ₯0 β] : | |
mul_action R (seminorm π E) := | |
fun_like.coe_injective.mul_action _ coe_smul | |
variables (π E) | |
/-- `coe_fn` as an `add_monoid_hom`. Helper definition for showing that `seminorm π E` is | |
a module. -/ | |
@[simps] | |
def coe_fn_add_monoid_hom : add_monoid_hom (seminorm π E) (E β β) := β¨coe_fn, coe_zero, coe_addβ© | |
lemma coe_fn_add_monoid_hom_injective : function.injective (coe_fn_add_monoid_hom π E) := | |
show @function.injective (seminorm π E) (E β β) coe_fn, from fun_like.coe_injective | |
variables {π E} | |
instance [monoid R] [distrib_mul_action R β] [has_smul R ββ₯0] [is_scalar_tower R ββ₯0 β] : | |
distrib_mul_action R (seminorm π E) := | |
(coe_fn_add_monoid_hom_injective π E).distrib_mul_action _ coe_smul | |
instance [semiring R] [module R β] [has_smul R ββ₯0] [is_scalar_tower R ββ₯0 β] : | |
module R (seminorm π E) := | |
(coe_fn_add_monoid_hom_injective π E).module R _ coe_smul | |
-- TODO: define `has_Sup` too, from the skeleton at | |
-- https://github.com/leanprover-community/mathlib/pull/11329#issuecomment-1008915345 | |
noncomputable instance : has_sup (seminorm π E) := | |
{ sup := Ξ» p q, | |
{ to_fun := p β q, | |
smul' := Ξ» x v, (congr_arg2 max (p.smul x v) (q.smul x v)).trans $ | |
(mul_max_of_nonneg _ _ $ norm_nonneg x).symm, | |
..(p.to_add_group_seminorm β q.to_add_group_seminorm) } } | |
@[simp] lemma coe_sup (p q : seminorm π E) : β(p β q) = p β q := rfl | |
lemma sup_apply (p q : seminorm π E) (x : E) : (p β q) x = p x β q x := rfl | |
lemma smul_sup [has_smul R β] [has_smul R ββ₯0] [is_scalar_tower R ββ₯0 β] | |
(r : R) (p q : seminorm π E) : | |
r β’ (p β q) = r β’ p β r β’ q := | |
have real.smul_max : β x y : β, r β’ max x y = max (r β’ x) (r β’ y), | |
from Ξ» x y, by simpa only [βsmul_eq_mul, βnnreal.smul_def, smul_one_smul ββ₯0 r (_ : β)] | |
using mul_max_of_nonneg x y (r β’ 1 : ββ₯0).prop, | |
ext $ Ξ» x, real.smul_max _ _ | |
instance : partial_order (seminorm π E) := | |
partial_order.lift _ fun_like.coe_injective | |
lemma le_def (p q : seminorm π E) : p β€ q β (p : E β β) β€ q := iff.rfl | |
lemma lt_def (p q : seminorm π E) : p < q β (p : E β β) < q := iff.rfl | |
noncomputable instance : semilattice_sup (seminorm π E) := | |
function.injective.semilattice_sup _ fun_like.coe_injective coe_sup | |
end has_smul | |
end add_group | |
section module | |
variables [add_comm_group E] [add_comm_group F] [add_comm_group G] | |
variables [module π E] [module π F] [module π G] | |
variables [has_smul R β] [has_smul R ββ₯0] [is_scalar_tower R ββ₯0 β] | |
/-- Composition of a seminorm with a linear map is a seminorm. -/ | |
def comp (p : seminorm π F) (f : E ββ[π] F) : seminorm π E := | |
{ to_fun := Ξ» x, p (f x), | |
smul' := Ξ» _ _, (congr_arg p (f.map_smul _ _)).trans (p.smul _ _), | |
..(p.to_add_group_seminorm.comp f.to_add_monoid_hom) } | |
lemma coe_comp (p : seminorm π F) (f : E ββ[π] F) : β(p.comp f) = p β f := rfl | |
@[simp] lemma comp_apply (p : seminorm π F) (f : E ββ[π] F) (x : E) : (p.comp f) x = p (f x) := rfl | |
@[simp] lemma comp_id (p : seminorm π E) : p.comp linear_map.id = p := | |
ext $ Ξ» _, rfl | |
@[simp] lemma comp_zero (p : seminorm π F) : p.comp (0 : E ββ[π] F) = 0 := | |
ext $ Ξ» _, map_zero p | |
@[simp] lemma zero_comp (f : E ββ[π] F) : (0 : seminorm π F).comp f = 0 := | |
ext $ Ξ» _, rfl | |
lemma comp_comp (p : seminorm π G) (g : F ββ[π] G) (f : E ββ[π] F) : | |
p.comp (g.comp f) = (p.comp g).comp f := | |
ext $ Ξ» _, rfl | |
lemma add_comp (p q : seminorm π F) (f : E ββ[π] F) : (p + q).comp f = p.comp f + q.comp f := | |
ext $ Ξ» _, rfl | |
lemma comp_add_le (p : seminorm π F) (f g : E ββ[π] F) : p.comp (f + g) β€ p.comp f + p.comp g := | |
Ξ» _, p.add_le _ _ | |
lemma smul_comp (p : seminorm π F) (f : E ββ[π] F) (c : R) : (c β’ p).comp f = c β’ (p.comp f) := | |
ext $ Ξ» _, rfl | |
lemma comp_mono {p : seminorm π F} {q : seminorm π F} (f : E ββ[π] F) (hp : p β€ q) : | |
p.comp f β€ q.comp f := Ξ» _, hp _ | |
/-- The composition as an `add_monoid_hom`. -/ | |
@[simps] def pullback (f : E ββ[π] F) : add_monoid_hom (seminorm π F) (seminorm π E) := | |
β¨Ξ» p, p.comp f, zero_comp f, Ξ» p q, add_comp p q fβ© | |
section | |
variables (p : seminorm π E) | |
@[simp] | |
protected lemma neg (x : E) : p (-x) = p x := | |
by rw [βneg_one_smul π, seminorm.smul, norm_neg, βseminorm.smul, one_smul] | |
protected lemma sub_le (x y : E) : p (x - y) β€ p x + p y := | |
calc | |
p (x - y) | |
= p (x + -y) : by rw sub_eq_add_neg | |
... β€ p x + p (-y) : p.add_le x (-y) | |
... = p x + p y : by rw p.neg | |
lemma sub_rev (x y : E) : p (x - y) = p (y - x) := by rw [βneg_sub, p.neg] | |
/-- The direct path from 0 to y is shorter than the path with x "inserted" in between. -/ | |
lemma le_insert (x y : E) : p y β€ p x + p (x - y) := | |
calc p y = p (x - (x - y)) : by rw sub_sub_cancel | |
... β€ p x + p (x - y) : p.sub_le _ _ | |
/-- The direct path from 0 to x is shorter than the path with y "inserted" in between. -/ | |
lemma le_insert' (x y : E) : p x β€ p y + p (x - y) := by { rw sub_rev, exact le_insert _ _ _ } | |
end | |
instance : order_bot (seminorm π E) := β¨0, seminorm.nonnegβ© | |
@[simp] lemma coe_bot : β(β₯ : seminorm π E) = 0 := rfl | |
lemma bot_eq_zero : (β₯ : seminorm π E) = 0 := rfl | |
lemma smul_le_smul {p q : seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) : | |
a β’ p β€ b β’ q := | |
begin | |
simp_rw [le_def, pi.le_def, coe_smul], | |
intros x, | |
simp_rw [pi.smul_apply, nnreal.smul_def, smul_eq_mul], | |
exact mul_le_mul hab (hpq x) (p.nonneg x) (nnreal.coe_nonneg b), | |
end | |
lemma finset_sup_apply (p : ΞΉ β seminorm π E) (s : finset ΞΉ) (x : E) : | |
s.sup p x = β(s.sup (Ξ» i, β¨p i x, (p i).nonneg xβ©) : ββ₯0) := | |
begin | |
induction s using finset.cons_induction_on with a s ha ih, | |
{ rw [finset.sup_empty, finset.sup_empty, coe_bot, _root_.bot_eq_zero, pi.zero_apply, | |
nonneg.coe_zero] }, | |
{ rw [finset.sup_cons, finset.sup_cons, coe_sup, sup_eq_max, pi.sup_apply, sup_eq_max, | |
nnreal.coe_max, subtype.coe_mk, ih] } | |
end | |
lemma finset_sup_le_sum (p : ΞΉ β seminorm π E) (s : finset ΞΉ) : s.sup p β€ β i in s, p i := | |
begin | |
classical, | |
refine finset.sup_le_iff.mpr _, | |
intros i hi, | |
rw [finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left], | |
exact bot_le, | |
end | |
lemma finset_sup_apply_le {p : ΞΉ β seminorm π E} {s : finset ΞΉ} {x : E} {a : β} (ha : 0 β€ a) | |
(h : β i, i β s β p i x β€ a) : s.sup p x β€ a := | |
begin | |
lift a to ββ₯0 using ha, | |
rw [finset_sup_apply, nnreal.coe_le_coe], | |
exact finset.sup_le h, | |
end | |
lemma finset_sup_apply_lt {p : ΞΉ β seminorm π E} {s : finset ΞΉ} {x : E} {a : β} (ha : 0 < a) | |
(h : β i, i β s β p i x < a) : s.sup p x < a := | |
begin | |
lift a to ββ₯0 using ha.le, | |
rw [finset_sup_apply, nnreal.coe_lt_coe, finset.sup_lt_iff], | |
{ exact h }, | |
{ exact nnreal.coe_pos.mpr ha }, | |
end | |
end module | |
end semi_normed_ring | |
section semi_normed_comm_ring | |
variables [semi_normed_comm_ring π] [add_comm_group E] [add_comm_group F] [module π E] [module π F] | |
lemma comp_smul (p : seminorm π F) (f : E ββ[π] F) (c : π) : | |
p.comp (c β’ f) = β₯cβ₯β β’ p.comp f := | |
ext $ Ξ» _, by rw [comp_apply, smul_apply, linear_map.smul_apply, p.smul, nnreal.smul_def, | |
coe_nnnorm, smul_eq_mul, comp_apply] | |
lemma comp_smul_apply (p : seminorm π F) (f : E ββ[π] F) (c : π) (x : E) : | |
p.comp (c β’ f) x = β₯cβ₯ * p (f x) := p.smul _ _ | |
end semi_normed_comm_ring | |
section normed_field | |
variables [normed_field π] [add_comm_group E] [module π E] | |
private lemma bdd_below_range_add (x : E) (p q : seminorm π E) : | |
bdd_below (range (Ξ» (u : E), p u + q (x - u))) := | |
by { use 0, rintro _ β¨x, rflβ©, exact add_nonneg (p.nonneg _) (q.nonneg _) } | |
noncomputable instance : has_inf (seminorm π E) := | |
{ inf := Ξ» p q, | |
{ to_fun := Ξ» x, β¨ u : E, p u + q (x-u), | |
smul' := | |
begin | |
intros a x, | |
obtain rfl | ha := eq_or_ne a 0, | |
{ rw [norm_zero, zero_mul, zero_smul], | |
refine cinfi_eq_of_forall_ge_of_forall_gt_exists_lt | |
(Ξ» i, add_nonneg (p.nonneg _) (q.nonneg _)) | |
(Ξ» x hx, β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©) }, | |
simp_rw [real.mul_infi_of_nonneg (norm_nonneg a), mul_add, βp.smul, βq.smul, smul_sub], | |
refine function.surjective.infi_congr ((β’) aβ»ΒΉ : E β E) (Ξ» u, β¨a β’ u, inv_smul_smulβ ha uβ©) | |
(Ξ» u, _), | |
rw smul_inv_smulβ ha | |
end, | |
..(p.to_add_group_seminorm β q.to_add_group_seminorm) }} | |
@[simp] lemma inf_apply (p q : seminorm π E) (x : E) : (p β q) x = β¨ u : E, p u + q (x-u) := rfl | |
noncomputable instance : lattice (seminorm π E) := | |
{ inf := (β), | |
inf_le_left := Ξ» p q x, begin | |
apply cinfi_le_of_le (bdd_below_range_add _ _ _) x, | |
simp only [sub_self, map_zero, add_zero], | |
end, | |
inf_le_right := Ξ» p q x, begin | |
apply cinfi_le_of_le (bdd_below_range_add _ _ _) (0:E), | |
simp only [sub_self, map_zero, zero_add, sub_zero], | |
end, | |
le_inf := Ξ» a b c hab hac x, | |
le_cinfi $ Ξ» u, le_trans (a.le_insert' _ _) (add_le_add (hab _) (hac _)), | |
..seminorm.semilattice_sup } | |
lemma smul_inf [has_smul R β] [has_smul R ββ₯0] [is_scalar_tower R ββ₯0 β] | |
(r : R) (p q : seminorm π E) : | |
r β’ (p β q) = r β’ p β r β’ q := | |
begin | |
ext, | |
simp_rw [smul_apply, inf_apply, smul_apply, βsmul_one_smul ββ₯0 r (_ : β), nnreal.smul_def, | |
smul_eq_mul, real.mul_infi_of_nonneg (subtype.prop _), mul_add], | |
end | |
end normed_field | |
/-! ### Seminorm ball -/ | |
section semi_normed_ring | |
variables [semi_normed_ring π] | |
section add_comm_group | |
variables [add_comm_group E] | |
section has_smul | |
variables [has_smul π E] (p : seminorm π E) | |
/-- The ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y` with | |
`p (y - x) < `r`. -/ | |
def ball (x : E) (r : β) := { y : E | p (y - x) < r } | |
variables {x y : E} {r : β} | |
@[simp] lemma mem_ball : y β ball p x r β p (y - x) < r := iff.rfl | |
lemma mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero] | |
lemma ball_zero_eq : ball p 0 r = { y : E | p y < r } := set.ext $ Ξ» x, p.mem_ball_zero | |
@[simp] lemma ball_zero' (x : E) (hr : 0 < r) : ball (0 : seminorm π E) x r = set.univ := | |
begin | |
rw [set.eq_univ_iff_forall, ball], | |
simp [hr], | |
end | |
lemma ball_smul (p : seminorm π E) {c : nnreal} (hc : 0 < c) (r : β) (x : E) : | |
(c β’ p).ball x r = p.ball x (r / c) := | |
by { ext, rw [mem_ball, mem_ball, smul_apply, nnreal.smul_def, smul_eq_mul, mul_comm, | |
lt_div_iff (nnreal.coe_pos.mpr hc)] } | |
lemma ball_sup (p : seminorm π E) (q : seminorm π E) (e : E) (r : β) : | |
ball (p β q) e r = ball p e r β© ball q e r := | |
by simp_rw [ball, βset.set_of_and, coe_sup, pi.sup_apply, sup_lt_iff] | |
lemma ball_finset_sup' (p : ΞΉ β seminorm π E) (s : finset ΞΉ) (H : s.nonempty) (e : E) (r : β) : | |
ball (s.sup' H p) e r = s.inf' H (Ξ» i, ball (p i) e r) := | |
begin | |
induction H using finset.nonempty.cons_induction with a a s ha hs ih, | |
{ classical, simp }, | |
{ rw [finset.sup'_cons hs, finset.inf'_cons hs, ball_sup, inf_eq_inter, ih] }, | |
end | |
lemma ball_mono {p : seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ := | |
Ξ» _ (hx : _ < _), hx.trans_le h | |
lemma ball_antitone {p q : seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := | |
Ξ» _, (h _).trans_lt | |
lemma ball_add_ball_subset (p : seminorm π E) (rβ rβ : β) (xβ xβ : E): | |
p.ball (xβ : E) rβ + p.ball (xβ : E) rβ β p.ball (xβ + xβ) (rβ + rβ) := | |
begin | |
rintros x β¨yβ, yβ, hyβ, hyβ, rflβ©, | |
rw [mem_ball, add_sub_add_comm], | |
exact (p.add_le _ _).trans_lt (add_lt_add hyβ hyβ), | |
end | |
end has_smul | |
section module | |
variables [module π E] | |
variables [add_comm_group F] [module π F] | |
lemma ball_comp (p : seminorm π F) (f : E ββ[π] F) (x : E) (r : β) : | |
(p.comp f).ball x r = f β»ΒΉ' (p.ball (f x) r) := | |
begin | |
ext, | |
simp_rw [ball, mem_preimage, comp_apply, set.mem_set_of_eq, map_sub], | |
end | |
variables (p : seminorm π E) | |
lemma ball_zero_eq_preimage_ball {r : β} : | |
p.ball 0 r = p β»ΒΉ' (metric.ball 0 r) := | |
begin | |
ext x, | |
simp only [mem_ball, sub_zero, mem_preimage, mem_ball_zero_iff], | |
rw real.norm_of_nonneg, | |
exact p.nonneg _, | |
end | |
@[simp] lemma ball_bot {r : β} (x : E) (hr : 0 < r) : | |
ball (β₯ : seminorm π E) x r = set.univ := | |
ball_zero' x hr | |
/-- Seminorm-balls at the origin are balanced. -/ | |
lemma balanced_ball_zero (r : β) : balanced π (ball p 0 r) := | |
begin | |
rintro a ha x β¨y, hy, hxβ©, | |
rw [mem_ball_zero, βhx, p.smul], | |
calc _ β€ p y : mul_le_of_le_one_left (p.nonneg _) ha | |
... < r : by rwa mem_ball_zero at hy, | |
end | |
lemma ball_finset_sup_eq_Inter (p : ΞΉ β seminorm π E) (s : finset ΞΉ) (x : E) {r : β} (hr : 0 < r) : | |
ball (s.sup p) x r = β (i β s), ball (p i) x r := | |
begin | |
lift r to nnreal using hr.le, | |
simp_rw [ball, Inter_set_of, finset_sup_apply, nnreal.coe_lt_coe, | |
finset.sup_lt_iff (show β₯ < r, from hr), βnnreal.coe_lt_coe, subtype.coe_mk], | |
end | |
lemma ball_finset_sup (p : ΞΉ β seminorm π E) (s : finset ΞΉ) (x : E) {r : β} (hr : 0 < r) : | |
ball (s.sup p) x r = s.inf (Ξ» i, ball (p i) x r) := | |
begin | |
rw finset.inf_eq_infi, | |
exact ball_finset_sup_eq_Inter _ _ _ hr, | |
end | |
lemma ball_smul_ball (p : seminorm π E) (rβ rβ : β) : | |
metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := | |
begin | |
rw set.subset_def, | |
intros x hx, | |
rw set.mem_smul at hx, | |
rcases hx with β¨a, y, ha, hy, hxβ©, | |
rw [βhx, mem_ball_zero, seminorm.smul], | |
exact mul_lt_mul'' (mem_ball_zero_iff.mp ha) (p.mem_ball_zero.mp hy) (norm_nonneg a) (p.nonneg y), | |
end | |
@[simp] lemma ball_eq_emptyset (p : seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β := | |
begin | |
ext, | |
rw [seminorm.mem_ball, set.mem_empty_eq, iff_false, not_lt], | |
exact hr.trans (p.nonneg _), | |
end | |
end module | |
end add_comm_group | |
end semi_normed_ring | |
section normed_field | |
variables [normed_field π] [add_comm_group E] [module π E] (p : seminorm π E) {A B : set E} | |
{a : π} {r : β} {x : E} | |
lemma smul_ball_zero {p : seminorm π E} {k : π} {r : β} (hk : 0 < β₯kβ₯) : | |
k β’ p.ball 0 r = p.ball 0 (β₯kβ₯ * r) := | |
begin | |
ext, | |
rw [set.mem_smul_set, seminorm.mem_ball_zero], | |
split; intro h, | |
{ rcases h with β¨y, hy, hβ©, | |
rw [βh, seminorm.smul], | |
rw seminorm.mem_ball_zero at hy, | |
exact (mul_lt_mul_left hk).mpr hy }, | |
refine β¨kβ»ΒΉ β’ x, _, _β©, | |
{ rw [seminorm.mem_ball_zero, seminorm.smul, norm_inv, β(mul_lt_mul_left hk), | |
βmul_assoc, β(div_eq_mul_inv β₯kβ₯ β₯kβ₯), div_self (ne_of_gt hk), one_mul], | |
exact h}, | |
rw [βsmul_assoc, smul_eq_mul, βdiv_eq_mul_inv, div_self (norm_pos_iff.mp hk), one_smul], | |
end | |
lemma ball_zero_absorbs_ball_zero (p : seminorm π E) {rβ rβ : β} (hrβ : 0 < rβ) : | |
absorbs π (p.ball 0 rβ) (p.ball 0 rβ) := | |
begin | |
by_cases hrβ : rβ β€ 0, | |
{ rw ball_eq_emptyset p hrβ, exact absorbs_empty }, | |
rw [not_le] at hrβ, | |
rcases exists_between hrβ with β¨r, hr, hr'β©, | |
refine β¨rβ/r, div_pos hrβ hr, _β©, | |
simp_rw set.subset_def, | |
intros a ha x hx, | |
have ha' : 0 < β₯aβ₯ := lt_of_lt_of_le (div_pos hrβ hr) ha, | |
rw [smul_ball_zero ha', p.mem_ball_zero], | |
rw p.mem_ball_zero at hx, | |
rw div_le_iff hr at ha, | |
exact hx.trans (lt_of_le_of_lt ha ((mul_lt_mul_left ha').mpr hr')), | |
end | |
/-- Seminorm-balls at the origin are absorbent. -/ | |
protected lemma absorbent_ball_zero (hr : 0 < r) : absorbent π (ball p (0 : E) r) := | |
begin | |
rw absorbent_iff_nonneg_lt, | |
rintro x, | |
have hxr : 0 β€ p x/r := div_nonneg (p.nonneg _) hr.le, | |
refine β¨p x/r, hxr, Ξ» a ha, _β©, | |
have haβ : 0 < β₯aβ₯ := hxr.trans_lt ha, | |
refine β¨aβ»ΒΉ β’ x, _, smul_inv_smulβ (norm_pos_iff.1 haβ) xβ©, | |
rwa [mem_ball_zero, p.smul, norm_inv, inv_mul_lt_iff haβ, βdiv_lt_iff hr], | |
end | |
/-- Seminorm-balls containing the origin are absorbent. -/ | |
protected lemma absorbent_ball (hpr : p x < r) : absorbent π (ball p x r) := | |
begin | |
refine (p.absorbent_ball_zero $ sub_pos.2 hpr).subset (Ξ» y hy, _), | |
rw p.mem_ball_zero at hy, | |
exact p.mem_ball.2 ((p.sub_le _ _).trans_lt $ add_lt_of_lt_sub_right hy), | |
end | |
lemma symmetric_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := | |
balanced_ball_zero p r (-1) (by rw [norm_neg, norm_one]) β¨x, hx, by rw [neg_smul, one_smul]β© | |
@[simp] | |
lemma neg_ball (p : seminorm π E) (r : β) (x : E) : | |
-ball p x r = ball p (-x) r := | |
by { ext, rw [mem_neg, mem_ball, mem_ball, βneg_add', sub_neg_eq_add, p.neg], } | |
@[simp] | |
lemma smul_ball_preimage (p : seminorm π E) (y : E) (r : β) (a : π) (ha : a β 0) : | |
((β’) a) β»ΒΉ' p.ball y r = p.ball (aβ»ΒΉ β’ y) (r / β₯aβ₯) := | |
set.ext $ Ξ» _, by rw [mem_preimage, mem_ball, mem_ball, | |
lt_div_iff (norm_pos_iff.mpr ha), mul_comm, βp.smul, smul_sub, smul_inv_smulβ ha] | |
end normed_field | |
section convex | |
variables [normed_field π] [add_comm_group E] [normed_space β π] [module π E] | |
section has_smul | |
variables [has_smul β E] [is_scalar_tower β π E] (p : seminorm π E) | |
/-- A seminorm is convex. Also see `convex_on_norm`. -/ | |
protected lemma convex_on : convex_on β univ p := | |
begin | |
refine β¨convex_univ, Ξ» x y _ _ a b ha hb hab, _β©, | |
calc p (a β’ x + b β’ y) β€ p (a β’ x) + p (b β’ y) : p.add_le _ _ | |
... = β₯a β’ (1 : π)β₯ * p x + β₯b β’ (1 : π)β₯ * p y | |
: by rw [βp.smul, βp.smul, smul_one_smul, smul_one_smul] | |
... = a * p x + b * p y | |
: by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, real.norm_of_nonneg ha, | |
real.norm_of_nonneg hb], | |
end | |
end has_smul | |
section module | |
variables [module β E] [is_scalar_tower β π E] (p : seminorm π E) (x : E) (r : β) | |
/-- Seminorm-balls are convex. -/ | |
lemma convex_ball : convex β (ball p x r) := | |
begin | |
convert (p.convex_on.translate_left (-x)).convex_lt r, | |
ext y, | |
rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg], | |
refl, | |
end | |
end module | |
end convex | |
end seminorm | |
/-! ### The norm as a seminorm -/ | |
section norm_seminorm | |
variables (π) (E) [normed_field π] [seminormed_add_comm_group E] [normed_space π E] {r : β} | |
/-- The norm of a seminormed group as an add_monoid seminorm. -/ | |
def norm_add_group_seminorm : add_group_seminorm E := | |
β¨norm, norm_zero, norm_nonneg, norm_add_le, norm_negβ© | |
@[simp] lemma coe_norm_add_group_seminorm : β(norm_add_group_seminorm E) = norm := rfl | |
/-- The norm of a seminormed group as a seminorm. -/ | |
def norm_seminorm : seminorm π E := | |
{ smul' := norm_smul, | |
..(norm_add_group_seminorm E)} | |
@[simp] lemma coe_norm_seminorm : β(norm_seminorm π E) = norm := rfl | |
@[simp] lemma ball_norm_seminorm : (norm_seminorm π E).ball = metric.ball := | |
by { ext x r y, simp only [seminorm.mem_ball, metric.mem_ball, coe_norm_seminorm, dist_eq_norm] } | |
variables {π E} {x : E} | |
/-- Balls at the origin are absorbent. -/ | |
lemma absorbent_ball_zero (hr : 0 < r) : absorbent π (metric.ball (0 : E) r) := | |
by { rw βball_norm_seminorm π, exact (norm_seminorm _ _).absorbent_ball_zero hr } | |
/-- Balls containing the origin are absorbent. -/ | |
lemma absorbent_ball (hx : β₯xβ₯ < r) : absorbent π (metric.ball x r) := | |
by { rw βball_norm_seminorm π, exact (norm_seminorm _ _).absorbent_ball hx } | |
/-- Balls at the origin are balanced. -/ | |
lemma balanced_ball_zero : balanced π (metric.ball (0 : E) r) := | |
by { rw βball_norm_seminorm π, exact (norm_seminorm _ _).balanced_ball_zero r } | |
end norm_seminorm | |