state
stringlengths 0
159k
| srcUpToTactic
stringlengths 387
167k
| nextTactic
stringlengths 3
9k
| declUpToTactic
stringlengths 22
11.5k
| declId
stringlengths 38
95
| decl
stringlengths 16
1.89k
| file_tag
stringlengths 17
73
|
---|---|---|---|---|---|---|
case hβ
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : SeminormedRing π
instβΒΉ : AddCommGroup E
instβ : SMul π E
pβ : Seminorm π E
x y : E
rβ : β
p : ΞΉ β Seminorm π E
s : Finset ΞΉ
e : E
r : β
a : ΞΉ
β’ ball (Finset.sup' {a} (_ : Finset.Nonempty {a}) p) e r =
Finset.inf' {a} (_ : Finset.Nonempty {a}) fun i => ball (p i) e r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
induction' H using Finset.Nonempty.cons_induction with a a s ha hs ih
Β· classical | simp | theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
induction' H using Finset.Nonempty.cons_induction with a a s ha hs ih
Β· classical | Mathlib.Analysis.Seminorm.759_0.ywwMCgoKeIFKDZ3 | theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r | Mathlib_Analysis_Seminorm |
case hβ
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : SeminormedRing π
instβΒΉ : AddCommGroup E
instβ : SMul π E
pβ : Seminorm π E
x y : E
rβ : β
p : ΞΉ β Seminorm π E
sβ : Finset ΞΉ
e : E
r : β
a : ΞΉ
s : Finset ΞΉ
ha : a β s
hs : Finset.Nonempty s
ih : ball (Finset.sup' s hs p) e r = Finset.inf' s hs fun i => ball (p i) e r
β’ ball (Finset.sup' (Finset.cons a s ha) (_ : Finset.Nonempty (Finset.cons a s ha)) p) e r =
Finset.inf' (Finset.cons a s ha) (_ : Finset.Nonempty (Finset.cons a s ha)) fun i => ball (p i) e r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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] | theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
induction' H using Finset.Nonempty.cons_induction with a a s ha hs ih
Β· classical simp
Β· | Mathlib.Analysis.Seminorm.759_0.ywwMCgoKeIFKDZ3 | theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r | Mathlib_Analysis_Seminorm |
case hβ
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : SeminormedRing π
instβΒΉ : AddCommGroup E
instβ : SMul π E
pβ : Seminorm π E
x y : E
rβ : β
p : ΞΉ β Seminorm π E
sβ : Finset ΞΉ
e : E
r : β
a : ΞΉ
s : Finset ΞΉ
ha : a β s
hs : Finset.Nonempty s
ih : ball (Finset.sup' s hs p) e r = Finset.inf' s hs fun i => ball (p i) e r
β’ ball (p a) e r β© ball (Finset.sup' s hs p) e r = ball (p a) e r β Finset.inf' s hs fun i => ball (p i) e r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
| simp only [inf_eq_inter, ih] | theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
| Mathlib.Analysis.Seminorm.759_0.ywwMCgoKeIFKDZ3 | theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : SeminormedRing π
instβΒΉ : AddCommGroup E
instβ : SMul π E
pβ : Seminorm π E
x y : E
rβ : β
p : ΞΉ β Seminorm π E
s : Finset ΞΉ
H : Finset.Nonempty s
e : E
r : β
β’ closedBall (Finset.sup' s H p) e r = Finset.inf' s H fun i => closedBall (p i) e r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
| induction' H using Finset.Nonempty.cons_induction with a a s ha hs ih | theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
| Mathlib.Analysis.Seminorm.768_0.ywwMCgoKeIFKDZ3 | theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r | Mathlib_Analysis_Seminorm |
case hβ
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : SeminormedRing π
instβΒΉ : AddCommGroup E
instβ : SMul π E
pβ : Seminorm π E
x y : E
rβ : β
p : ΞΉ β Seminorm π E
s : Finset ΞΉ
e : E
r : β
a : ΞΉ
β’ closedBall (Finset.sup' {a} (_ : Finset.Nonempty {a}) p) e r =
Finset.inf' {a} (_ : Finset.Nonempty {a}) fun i => closedBall (p i) e r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
induction' H using Finset.Nonempty.cons_induction with a a s ha hs ih
Β· | classical simp | theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
induction' H using Finset.Nonempty.cons_induction with a a s ha hs ih
Β· | Mathlib.Analysis.Seminorm.768_0.ywwMCgoKeIFKDZ3 | theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r | Mathlib_Analysis_Seminorm |
case hβ
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : SeminormedRing π
instβΒΉ : AddCommGroup E
instβ : SMul π E
pβ : Seminorm π E
x y : E
rβ : β
p : ΞΉ β Seminorm π E
s : Finset ΞΉ
e : E
r : β
a : ΞΉ
β’ closedBall (Finset.sup' {a} (_ : Finset.Nonempty {a}) p) e r =
Finset.inf' {a} (_ : Finset.Nonempty {a}) fun i => closedBall (p i) e r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
induction' H using Finset.Nonempty.cons_induction with a a s ha hs ih
Β· classical | simp | theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
induction' H using Finset.Nonempty.cons_induction with a a s ha hs ih
Β· classical | Mathlib.Analysis.Seminorm.768_0.ywwMCgoKeIFKDZ3 | theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r | Mathlib_Analysis_Seminorm |
case hβ
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : SeminormedRing π
instβΒΉ : AddCommGroup E
instβ : SMul π E
pβ : Seminorm π E
x y : E
rβ : β
p : ΞΉ β Seminorm π E
sβ : Finset ΞΉ
e : E
r : β
a : ΞΉ
s : Finset ΞΉ
ha : a β s
hs : Finset.Nonempty s
ih : closedBall (Finset.sup' s hs p) e r = Finset.inf' s hs fun i => closedBall (p i) e r
β’ closedBall (Finset.sup' (Finset.cons a s ha) (_ : Finset.Nonempty (Finset.cons a s ha)) p) e r =
Finset.inf' (Finset.cons a s ha) (_ : Finset.Nonempty (Finset.cons a s ha)) fun i => closedBall (p i) e r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup] | theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
induction' H using Finset.Nonempty.cons_induction with a a s ha hs ih
Β· classical simp
Β· | Mathlib.Analysis.Seminorm.768_0.ywwMCgoKeIFKDZ3 | theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r | Mathlib_Analysis_Seminorm |
case hβ
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : SeminormedRing π
instβΒΉ : AddCommGroup E
instβ : SMul π E
pβ : Seminorm π E
x y : E
rβ : β
p : ΞΉ β Seminorm π E
sβ : Finset ΞΉ
e : E
r : β
a : ΞΉ
s : Finset ΞΉ
ha : a β s
hs : Finset.Nonempty s
ih : closedBall (Finset.sup' s hs p) e r = Finset.inf' s hs fun i => closedBall (p i) e r
β’ closedBall (p a) e r β© closedBall (Finset.sup' s hs p) e r =
closedBall (p a) e r β Finset.inf' s hs fun i => closedBall (p i) e r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
| simp only [inf_eq_inter, ih] | theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
| Mathlib.Analysis.Seminorm.768_0.ywwMCgoKeIFKDZ3 | theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : SeminormedRing π
instβΒΉ : AddCommGroup E
instβ : SMul π E
pβ : Seminorm π E
x y : E
r : β
p : Seminorm π E
rβ rβ : β
xβ xβ : E
β’ ball p xβ rβ + ball p xβ rβ β ball p (xβ + xβ) (rβ + rβ) | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
| rintro x β¨yβ, yβ, hyβ, hyβ, rflβ© | theorem 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β) := by
| Mathlib.Analysis.Seminorm.793_0.ywwMCgoKeIFKDZ3 | theorem 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β) | Mathlib_Analysis_Seminorm |
case intro.intro.intro.intro
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : SeminormedRing π
instβΒΉ : AddCommGroup E
instβ : SMul π E
pβ : Seminorm π E
x y : E
r : β
p : Seminorm π E
rβ rβ : β
xβ xβ yβ yβ : E
hyβ : yβ β ball p xβ rβ
hyβ : yβ β ball p xβ rβ
β’ (fun x x_1 => x + x_1) yβ yβ β ball p (xβ + xβ) (rβ + rβ) | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
| rw [mem_ball, add_sub_add_comm] | theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
| Mathlib.Analysis.Seminorm.793_0.ywwMCgoKeIFKDZ3 | theorem 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β) | Mathlib_Analysis_Seminorm |
case intro.intro.intro.intro
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : SeminormedRing π
instβΒΉ : AddCommGroup E
instβ : SMul π E
pβ : Seminorm π E
x y : E
r : β
p : Seminorm π E
rβ rβ : β
xβ xβ yβ yβ : E
hyβ : yβ β ball p xβ rβ
hyβ : yβ β ball p xβ rβ
β’ p (yβ - xβ + (yβ - xβ)) < rβ + rβ | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
| exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ) | theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
| Mathlib.Analysis.Seminorm.793_0.ywwMCgoKeIFKDZ3 | theorem 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β) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : SeminormedRing π
instβΒΉ : AddCommGroup E
instβ : SMul π E
pβ : Seminorm π E
x y : E
r : β
p : Seminorm π E
rβ rβ : β
xβ xβ : E
β’ closedBall p xβ rβ + closedBall p xβ rβ β closedBall p (xβ + xβ) (rβ + rβ) | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
| rintro x β¨yβ, yβ, hyβ, hyβ, rflβ© | theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
| Mathlib.Analysis.Seminorm.800_0.ywwMCgoKeIFKDZ3 | theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) | Mathlib_Analysis_Seminorm |
case intro.intro.intro.intro
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : SeminormedRing π
instβΒΉ : AddCommGroup E
instβ : SMul π E
pβ : Seminorm π E
x y : E
r : β
p : Seminorm π E
rβ rβ : β
xβ xβ yβ yβ : E
hyβ : yβ β closedBall p xβ rβ
hyβ : yβ β closedBall p xβ rβ
β’ (fun x x_1 => x + x_1) yβ yβ β closedBall p (xβ + xβ) (rβ + rβ) | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
| rw [mem_closedBall, add_sub_add_comm] | theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
| Mathlib.Analysis.Seminorm.800_0.ywwMCgoKeIFKDZ3 | theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) | Mathlib_Analysis_Seminorm |
case intro.intro.intro.intro
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : SeminormedRing π
instβΒΉ : AddCommGroup E
instβ : SMul π E
pβ : Seminorm π E
x y : E
r : β
p : Seminorm π E
rβ rβ : β
xβ xβ yβ yβ : E
hyβ : yβ β closedBall p xβ rβ
hyβ : yβ β closedBall p xβ rβ
β’ p (yβ - xβ + (yβ - xβ)) β€ rβ + rβ | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
| exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ) | theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
| Mathlib.Analysis.Seminorm.800_0.ywwMCgoKeIFKDZ3 | theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : SeminormedRing π
instβΒΉ : AddCommGroup E
instβ : SMul π E
pβ : Seminorm π E
x yβ : E
rβ : β
p : Seminorm π E
xβ xβ y : E
r : β
β’ xβ - xβ β ball p y r β xβ β ball p (xβ + y) r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by | simp_rw [mem_ball, sub_sub] | theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by | Mathlib.Analysis.Seminorm.807_0.ywwMCgoKeIFKDZ3 | theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
p : Seminorm πβ Eβ
f : E βββ[Οββ] Eβ
x : E
r : β
β’ ball (comp p f) x r = βf β»ΒΉ' ball p (f x) r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
| ext | theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
| Mathlib.Analysis.Seminorm.833_0.ywwMCgoKeIFKDZ3 | theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r | Mathlib_Analysis_Seminorm |
case h
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
p : Seminorm πβ Eβ
f : E βββ[Οββ] Eβ
x : E
r : β
xβ : E
β’ xβ β ball (comp p f) x r β xβ β βf β»ΒΉ' ball p (f x) r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
| simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub] | theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
| Mathlib.Analysis.Seminorm.833_0.ywwMCgoKeIFKDZ3 | theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
p : Seminorm πβ Eβ
f : E βββ[Οββ] Eβ
x : E
r : β
β’ closedBall (comp p f) x r = βf β»ΒΉ' closedBall p (f x) r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
| ext | theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
| Mathlib.Analysis.Seminorm.839_0.ywwMCgoKeIFKDZ3 | theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r | Mathlib_Analysis_Seminorm |
case h
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
p : Seminorm πβ Eβ
f : E βββ[Οββ] Eβ
x : E
r : β
xβ : E
β’ xβ β closedBall (comp p f) x r β xβ β βf β»ΒΉ' closedBall p (f x) r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
| simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub] | theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
| Mathlib.Analysis.Seminorm.839_0.ywwMCgoKeIFKDZ3 | theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
p : Seminorm π E
r : β
β’ βp β»ΒΉ' Metric.ball 0 r = {x | p x < r} | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
| ext x | theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
| Mathlib.Analysis.Seminorm.847_0.ywwMCgoKeIFKDZ3 | theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } | Mathlib_Analysis_Seminorm |
case h
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
p : Seminorm π E
r : β
x : E
β’ x β βp β»ΒΉ' Metric.ball 0 r β x β {x | p x < r} | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
| simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)] | theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
| Mathlib.Analysis.Seminorm.847_0.ywwMCgoKeIFKDZ3 | theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
p : Seminorm π E
r : β
β’ βp β»ΒΉ' Metric.closedBall 0 r = {x | p x β€ r} | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
| ext x | theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
| Mathlib.Analysis.Seminorm.852_0.ywwMCgoKeIFKDZ3 | theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } | Mathlib_Analysis_Seminorm |
case h
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
p : Seminorm π E
r : β
x : E
β’ x β βp β»ΒΉ' Metric.closedBall 0 r β x β {x | p x β€ r} | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
| simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)] | theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
| Mathlib.Analysis.Seminorm.852_0.ywwMCgoKeIFKDZ3 | theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
p : Seminorm π E
r : β
β’ ball p 0 r = βp β»ΒΉ' Metric.ball 0 r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
| rw [ball_zero_eq, preimage_metric_ball] | theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
| Mathlib.Analysis.Seminorm.858_0.ywwMCgoKeIFKDZ3 | theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
p : Seminorm π E
r : β
β’ closedBall p 0 r = βp β»ΒΉ' Metric.closedBall 0 r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
| rw [closedBall_zero_eq, preimage_metric_closedBall] | theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
| Mathlib.Analysis.Seminorm.862_0.ywwMCgoKeIFKDZ3 | theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
p : Seminorm π E
r : β
β’ Balanced π (ball p 0 r) | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
| rintro a ha x β¨y, hy, hxβ© | /-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
| Mathlib.Analysis.Seminorm.878_0.ywwMCgoKeIFKDZ3 | /-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) | Mathlib_Analysis_Seminorm |
case intro.intro
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
p : Seminorm π E
r : β
a : π
ha : βaβ β€ 1
x y : E
hy : y β ball p 0 r
hx : (fun x => a β’ x) y = x
β’ x β ball p 0 r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
| rw [mem_ball_zero, β hx, map_smul_eq_mul] | /-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
| Mathlib.Analysis.Seminorm.878_0.ywwMCgoKeIFKDZ3 | /-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) | Mathlib_Analysis_Seminorm |
case intro.intro
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
p : Seminorm π E
r : β
a : π
ha : βaβ β€ 1
x y : E
hy : y β ball p 0 r
hx : (fun x => a β’ x) y = x
β’ βaβ * p y < r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
| calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy | /-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
| Mathlib.Analysis.Seminorm.878_0.ywwMCgoKeIFKDZ3 | /-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
p : Seminorm π E
r : β
a : π
ha : βaβ β€ 1
x y : E
hy : y β ball p 0 r
hx : (fun x => a β’ x) y = x
β’ p y < r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by | rwa [mem_ball_zero] at hy | /-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by | Mathlib.Analysis.Seminorm.878_0.ywwMCgoKeIFKDZ3 | /-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
p : Seminorm π E
r : β
β’ Balanced π (closedBall p 0 r) | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
| rintro a ha x β¨y, hy, hxβ© | /-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
| Mathlib.Analysis.Seminorm.887_0.ywwMCgoKeIFKDZ3 | /-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) | Mathlib_Analysis_Seminorm |
case intro.intro
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
p : Seminorm π E
r : β
a : π
ha : βaβ β€ 1
x y : E
hy : y β closedBall p 0 r
hx : (fun x => a β’ x) y = x
β’ x β closedBall p 0 r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
| rw [mem_closedBall_zero, β hx, map_smul_eq_mul] | /-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
| Mathlib.Analysis.Seminorm.887_0.ywwMCgoKeIFKDZ3 | /-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) | Mathlib_Analysis_Seminorm |
case intro.intro
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
p : Seminorm π E
r : β
a : π
ha : βaβ β€ 1
x y : E
hy : y β closedBall p 0 r
hx : (fun x => a β’ x) y = x
β’ βaβ * p y β€ r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
| calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy | /-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
| Mathlib.Analysis.Seminorm.887_0.ywwMCgoKeIFKDZ3 | /-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
p : Seminorm π E
r : β
a : π
ha : βaβ β€ 1
x y : E
hy : y β closedBall p 0 r
hx : (fun x => a β’ x) y = x
β’ p y β€ r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by | rwa [mem_closedBall_zero] at hy | /-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by | Mathlib.Analysis.Seminorm.887_0.ywwMCgoKeIFKDZ3 | /-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ : Seminorm π E
p : ΞΉ β Seminorm π E
s : Finset ΞΉ
x : E
r : β
hr : 0 < r
β’ ball (Finset.sup s p) x r = β i β s, ball (p i) x r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
| lift r to NNReal using hr.le | theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
| Mathlib.Analysis.Seminorm.896_0.ywwMCgoKeIFKDZ3 | theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r | Mathlib_Analysis_Seminorm |
case intro
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ : Seminorm π E
p : ΞΉ β Seminorm π E
s : Finset ΞΉ
x : E
r : ββ₯0
hr : 0 < βr
β’ ball (Finset.sup s p) x βr = β i β s, ball (p i) x βr | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
| simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk] | theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
| Mathlib.Analysis.Seminorm.896_0.ywwMCgoKeIFKDZ3 | theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ : Seminorm π E
p : ΞΉ β Seminorm π E
s : Finset ΞΉ
x : E
r : β
hr : 0 β€ r
β’ closedBall (Finset.sup s p) x r = β i β s, closedBall (p i) x r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
| lift r to NNReal using hr | theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
| Mathlib.Analysis.Seminorm.903_0.ywwMCgoKeIFKDZ3 | theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r | Mathlib_Analysis_Seminorm |
case intro
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ : Seminorm π E
p : ΞΉ β Seminorm π E
s : Finset ΞΉ
x : E
r : ββ₯0
β’ closedBall (Finset.sup s p) x βr = β i β s, closedBall (p i) x βr | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
| simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk] | theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
| Mathlib.Analysis.Seminorm.903_0.ywwMCgoKeIFKDZ3 | theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ : Seminorm π E
p : ΞΉ β Seminorm π E
s : Finset ΞΉ
x : E
r : β
hr : 0 < r
β’ ball (Finset.sup s p) x r = Finset.inf s fun i => ball (p i) x r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
| rw [Finset.inf_eq_iInf] | theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
| Mathlib.Analysis.Seminorm.910_0.ywwMCgoKeIFKDZ3 | theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ : Seminorm π E
p : ΞΉ β Seminorm π E
s : Finset ΞΉ
x : E
r : β
hr : 0 < r
β’ ball (Finset.sup s p) x r = β¨
a β s, ball (p a) x r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
| exact ball_finset_sup_eq_iInter _ _ _ hr | theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
| Mathlib.Analysis.Seminorm.910_0.ywwMCgoKeIFKDZ3 | theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ : Seminorm π E
p : ΞΉ β Seminorm π E
s : Finset ΞΉ
x : E
r : β
hr : 0 β€ r
β’ closedBall (Finset.sup s p) x r = Finset.inf s fun i => closedBall (p i) x r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
| rw [Finset.inf_eq_iInf] | theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
| Mathlib.Analysis.Seminorm.916_0.ywwMCgoKeIFKDZ3 | theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ : Seminorm π E
p : ΞΉ β Seminorm π E
s : Finset ΞΉ
x : E
r : β
hr : 0 β€ r
β’ closedBall (Finset.sup s p) x r = β¨
a β s, closedBall (p a) x r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
| exact closedBall_finset_sup_eq_iInter _ _ _ hr | theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
| Mathlib.Analysis.Seminorm.916_0.ywwMCgoKeIFKDZ3 | theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ p : Seminorm π E
x : E
r : β
hr : r β€ 0
β’ ball p x r = β
| /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
| ext | @[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
| Mathlib.Analysis.Seminorm.922_0.ywwMCgoKeIFKDZ3 | @[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
| Mathlib_Analysis_Seminorm |
case h
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ p : Seminorm π E
x : E
r : β
hr : r β€ 0
xβ : E
β’ xβ β ball p x r β xβ β β
| /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
| rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt] | @[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
| Mathlib.Analysis.Seminorm.922_0.ywwMCgoKeIFKDZ3 | @[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
| Mathlib_Analysis_Seminorm |
case h
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ p : Seminorm π E
x : E
r : β
hr : r β€ 0
xβ : E
β’ r β€ p (xβ - x) | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
| exact hr.trans (map_nonneg p _) | @[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
| Mathlib.Analysis.Seminorm.922_0.ywwMCgoKeIFKDZ3 | @[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
| Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ p : Seminorm π E
x : E
r : β
hr : r < 0
β’ closedBall p x r = β
| /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
| ext | @[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
| Mathlib.Analysis.Seminorm.929_0.ywwMCgoKeIFKDZ3 | @[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
| Mathlib_Analysis_Seminorm |
case h
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ p : Seminorm π E
x : E
r : β
hr : r < 0
xβ : E
β’ xβ β closedBall p x r β xβ β β
| /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
| rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le] | @[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
| Mathlib.Analysis.Seminorm.929_0.ywwMCgoKeIFKDZ3 | @[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
| Mathlib_Analysis_Seminorm |
case h
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ p : Seminorm π E
x : E
r : β
hr : r < 0
xβ : E
β’ r < p (xβ - x) | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
| exact hr.trans_le (map_nonneg _ _) | @[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
| Mathlib.Analysis.Seminorm.929_0.ywwMCgoKeIFKDZ3 | @[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
| Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ p : Seminorm π E
rβ : β
hrβ : rβ β 0
rβ : β
β’ Metric.closedBall 0 rβ β’ ball p 0 rβ β ball p 0 (rβ * rβ) | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
| simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul] | theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
| Mathlib.Analysis.Seminorm.937_0.ywwMCgoKeIFKDZ3 | theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ p : Seminorm π E
rβ : β
hrβ : rβ β 0
rβ : β
β’ β (a : π), βaβ β€ rβ β β (b : E), p b < rβ β βaβ * p b < rβ * rβ | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
| refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_ | theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
| Mathlib.Analysis.Seminorm.937_0.ywwMCgoKeIFKDZ3 | theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ p : Seminorm π E
rβ : β
hrβ : rβ β 0
rβ : β
a : π
ha : βaβ β€ rβ
b : E
hb : p b < rβ
β’ 0 < rβ | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
| exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt | theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
| Mathlib.Analysis.Seminorm.937_0.ywwMCgoKeIFKDZ3 | theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ p : Seminorm π E
rβ rβ : β
hrβ : rβ β 0
β’ Metric.ball 0 rβ β’ closedBall p 0 rβ β ball p 0 (rβ * rβ) | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
| simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul] | theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
| Mathlib.Analysis.Seminorm.943_0.ywwMCgoKeIFKDZ3 | theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ p : Seminorm π E
rβ rβ : β
hrβ : rβ β 0
β’ β (a : π), βaβ < rβ β β (b : E), p b β€ rβ β βaβ * p b < rβ * rβ | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
| intro a ha b hb | theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
| Mathlib.Analysis.Seminorm.943_0.ywwMCgoKeIFKDZ3 | theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ p : Seminorm π E
rβ rβ : β
hrβ : rβ β 0
a : π
ha : βaβ < rβ
b : E
hb : p b β€ rβ
β’ βaβ * p b < rβ * rβ | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
| rw [mul_comm, mul_comm rβ] | theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
| Mathlib.Analysis.Seminorm.943_0.ywwMCgoKeIFKDZ3 | theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ p : Seminorm π E
rβ rβ : β
hrβ : rβ β 0
a : π
ha : βaβ < rβ
b : E
hb : p b β€ rβ
β’ p b * βaβ < rβ * rβ | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
| refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_) | theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
| Mathlib.Analysis.Seminorm.943_0.ywwMCgoKeIFKDZ3 | theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ p : Seminorm π E
rβ rβ : β
hrβ : rβ β 0
a : π
ha : βaβ < rβ
b : E
hb : p b β€ rβ
β’ Β¬rβ < 0 | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
| exact ((map_nonneg p b).trans hb).not_lt | theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
| Mathlib.Analysis.Seminorm.943_0.ywwMCgoKeIFKDZ3 | theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ p : Seminorm π E
rβ rβ : β
β’ Metric.ball 0 rβ β’ ball p 0 rβ β ball p 0 (rβ * rβ) | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
| rcases eq_or_ne rβ 0 with rfl | hrβ | theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
| Mathlib.Analysis.Seminorm.952_0.ywwMCgoKeIFKDZ3 | theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) | Mathlib_Analysis_Seminorm |
case inl
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ p : Seminorm π E
rβ : β
β’ Metric.ball 0 rβ β’ ball p 0 0 β ball p 0 (rβ * 0) | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· | simp | theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· | Mathlib.Analysis.Seminorm.952_0.ywwMCgoKeIFKDZ3 | theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) | Mathlib_Analysis_Seminorm |
case inr
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ p : Seminorm π E
rβ rβ : β
hrβ : rβ β 0
β’ Metric.ball 0 rβ β’ ball p 0 rβ β ball p 0 (rβ * rβ) | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· | exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ) | theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· | Mathlib.Analysis.Seminorm.952_0.ywwMCgoKeIFKDZ3 | theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ p : Seminorm π E
rβ rβ : β
β’ Metric.closedBall 0 rβ β’ closedBall p 0 rβ β closedBall p 0 (rβ * rβ) | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
| simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul] | theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
| Mathlib.Analysis.Seminorm.960_0.ywwMCgoKeIFKDZ3 | theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ p : Seminorm π E
rβ rβ : β
β’ β (a : π), βaβ β€ rβ β β (b : E), p b β€ rβ β βaβ * p b β€ rβ * rβ | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
| intro a ha b hb | theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
| Mathlib.Analysis.Seminorm.960_0.ywwMCgoKeIFKDZ3 | theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ p : Seminorm π E
rβ rβ : β
a : π
ha : βaβ β€ rβ
b : E
hb : p b β€ rβ
β’ βaβ * p b β€ rβ * rβ | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
| gcongr | theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
| Mathlib.Analysis.Seminorm.960_0.ywwMCgoKeIFKDZ3 | theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) | Mathlib_Analysis_Seminorm |
case b0
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ p : Seminorm π E
rβ rβ : β
a : π
ha : βaβ β€ rβ
b : E
hb : p b β€ rβ
β’ 0 β€ rβ | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
| exact (norm_nonneg _).trans ha | theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
| Mathlib.Analysis.Seminorm.960_0.ywwMCgoKeIFKDZ3 | theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
p : Seminorm π E
x : E
r : β
hx : x β ball p 0 r
β’ -x β ball p 0 r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
| simpa only [mem_ball_zero, map_neg_eq_map] using hx | theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
| Mathlib.Analysis.Seminorm.969_0.ywwMCgoKeIFKDZ3 | theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ p : Seminorm π E
r : β
x : E
β’ -ball p x r = ball p (-x) r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
| ext | @[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
| Mathlib.Analysis.Seminorm.973_0.ywwMCgoKeIFKDZ3 | @[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r | Mathlib_Analysis_Seminorm |
case h
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instββΆ : SeminormedRing π
instββ΅ : AddCommGroup E
instββ΄ : Module π E
instβΒ³ : SeminormedRing πβ
instβΒ² : AddCommGroup Eβ
instβΒΉ : Module πβ Eβ
Οββ : π β+* πβ
instβ : RingHomIsometric Οββ
pβ p : Seminorm π E
r : β
x xβ : E
β’ xβ β -ball p x r β xβ β ball p (-x) r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
| rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map] | @[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
| Mathlib.Analysis.Seminorm.973_0.ywwMCgoKeIFKDZ3 | @[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
x : E
p : ΞΉ β Seminorm π E
hp : BddAbove (range p)
e : E
r : β
hr : 0 < r
β’ closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
| cases isEmpty_or_nonempty ΞΉ | theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
| Mathlib.Analysis.Seminorm.990_0.ywwMCgoKeIFKDZ3 | theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r | Mathlib_Analysis_Seminorm |
case inl
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
x : E
p : ΞΉ β Seminorm π E
hp : BddAbove (range p)
e : E
r : β
hr : 0 < r
hβ : IsEmpty ΞΉ
β’ closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· | rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty] | theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· | Mathlib.Analysis.Seminorm.990_0.ywwMCgoKeIFKDZ3 | theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r | Mathlib_Analysis_Seminorm |
case inl
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
x : E
p : ΞΉ β Seminorm π E
hp : BddAbove (range p)
e : E
r : β
hr : 0 < r
hβ : IsEmpty ΞΉ
β’ closedBall β₯ e r = univ | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
| exact closedBall_bot _ hr | theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
| Mathlib.Analysis.Seminorm.990_0.ywwMCgoKeIFKDZ3 | theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r | Mathlib_Analysis_Seminorm |
case inr
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
x : E
p : ΞΉ β Seminorm π E
hp : BddAbove (range p)
e : E
r : β
hr : 0 < r
hβ : Nonempty ΞΉ
β’ closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· | ext x | theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· | Mathlib.Analysis.Seminorm.990_0.ywwMCgoKeIFKDZ3 | theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r | Mathlib_Analysis_Seminorm |
case inr.h
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
xβ : E
p : ΞΉ β Seminorm π E
hp : BddAbove (range p)
e : E
r : β
hr : 0 < r
hβ : Nonempty ΞΉ
x : E
β’ x β closedBall (β¨ i, p i) e r β x β β i, closedBall (p i) e r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
| have := Seminorm.bddAbove_range_iff.mp hp (x - e) | theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
| Mathlib.Analysis.Seminorm.990_0.ywwMCgoKeIFKDZ3 | theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r | Mathlib_Analysis_Seminorm |
case inr.h
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
xβ : E
p : ΞΉ β Seminorm π E
hp : BddAbove (range p)
e : E
r : β
hr : 0 < r
hβ : Nonempty ΞΉ
x : E
this : BddAbove (range fun i => (p i) (x - e))
β’ x β closedBall (β¨ i, p i) e r β x β β i, closedBall (p i) e r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
| simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this] | theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
| Mathlib.Analysis.Seminorm.990_0.ywwMCgoKeIFKDZ3 | theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
x : E
p : Seminorm π E
k : π
r : β
β’ ball p 0 (βkβ * r) β k β’ ball p 0 r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
| rcases eq_or_ne k 0 with (rfl | hk) | theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
| Mathlib.Analysis.Seminorm.999_0.ywwMCgoKeIFKDZ3 | theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r | Mathlib_Analysis_Seminorm |
case inl
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
x : E
p : Seminorm π E
r : β
β’ ball p 0 (β0β * r) β 0 β’ ball p 0 r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· | rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl] | theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· | Mathlib.Analysis.Seminorm.999_0.ywwMCgoKeIFKDZ3 | theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r | Mathlib_Analysis_Seminorm |
case inl
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
x : E
p : Seminorm π E
r : β
β’ β
β 0 β’ ball p 0 r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
| exact empty_subset _ | theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
| Mathlib.Analysis.Seminorm.999_0.ywwMCgoKeIFKDZ3 | theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r | Mathlib_Analysis_Seminorm |
case inr
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
x : E
p : Seminorm π E
k : π
r : β
hk : k β 0
β’ ball p 0 (βkβ * r) β k β’ ball p 0 r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· | intro x | theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· | Mathlib.Analysis.Seminorm.999_0.ywwMCgoKeIFKDZ3 | theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r | Mathlib_Analysis_Seminorm |
case inr
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
xβ : E
p : Seminorm π E
k : π
r : β
hk : k β 0
x : E
β’ x β ball p 0 (βkβ * r) β x β k β’ ball p 0 r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
| rw [Set.mem_smul_set, Seminorm.mem_ball_zero] | theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
| Mathlib.Analysis.Seminorm.999_0.ywwMCgoKeIFKDZ3 | theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r | Mathlib_Analysis_Seminorm |
case inr
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
xβ : E
p : Seminorm π E
k : π
r : β
hk : k β 0
x : E
β’ p x < βkβ * r β β y β ball p 0 r, k β’ y = x | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
| refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β© | theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
| Mathlib.Analysis.Seminorm.999_0.ywwMCgoKeIFKDZ3 | theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r | Mathlib_Analysis_Seminorm |
case inr.refine'_1
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
xβ : E
p : Seminorm π E
k : π
r : β
hk : k β 0
x : E
hx : p x < βkβ * r
β’ kβ»ΒΉ β’ x β ball p 0 r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· | rwa [Seminorm.mem_ball_zero, map_smul_eq_mul, norm_inv, β
mul_lt_mul_left <| norm_pos_iff.mpr hk, β mul_assoc, β div_eq_mul_inv βkβ βkβ,
div_self (ne_of_gt <| norm_pos_iff.mpr hk), one_mul] | theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· | Mathlib.Analysis.Seminorm.999_0.ywwMCgoKeIFKDZ3 | theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r | Mathlib_Analysis_Seminorm |
case inr.refine'_2
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
xβ : E
p : Seminorm π E
k : π
r : β
hk : k β 0
x : E
hx : p x < βkβ * r
β’ k β’ kβ»ΒΉ β’ x = x | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_ball_zero, map_smul_eq_mul, norm_inv, β
mul_lt_mul_left <| norm_pos_iff.mpr hk, β mul_assoc, β div_eq_mul_inv βkβ βkβ,
div_self (ne_of_gt <| norm_pos_iff.mpr hk), one_mul]
| rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self hk, one_smul] | theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_ball_zero, map_smul_eq_mul, norm_inv, β
mul_lt_mul_left <| norm_pos_iff.mpr hk, β mul_assoc, β div_eq_mul_inv βkβ βkβ,
div_self (ne_of_gt <| norm_pos_iff.mpr hk), one_mul]
| Mathlib.Analysis.Seminorm.999_0.ywwMCgoKeIFKDZ3 | theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
x : E
p : Seminorm π E
k : π
r : β
hk : k β 0
β’ k β’ ball p 0 r = ball p 0 (βkβ * r) | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_ball_zero, map_smul_eq_mul, norm_inv, β
mul_lt_mul_left <| norm_pos_iff.mpr hk, β mul_assoc, β div_eq_mul_inv βkβ βkβ,
div_self (ne_of_gt <| norm_pos_iff.mpr hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self hk, one_smul]
#align seminorm.ball_norm_mul_subset Seminorm.ball_norm_mul_subset
theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) := by
| ext | theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) := by
| Mathlib.Analysis.Seminorm.1013_0.ywwMCgoKeIFKDZ3 | theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) | Mathlib_Analysis_Seminorm |
case h
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
x : E
p : Seminorm π E
k : π
r : β
hk : k β 0
xβ : E
β’ xβ β k β’ ball p 0 r β xβ β ball p 0 (βkβ * r) | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_ball_zero, map_smul_eq_mul, norm_inv, β
mul_lt_mul_left <| norm_pos_iff.mpr hk, β mul_assoc, β div_eq_mul_inv βkβ βkβ,
div_self (ne_of_gt <| norm_pos_iff.mpr hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self hk, one_smul]
#align seminorm.ball_norm_mul_subset Seminorm.ball_norm_mul_subset
theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) := by
ext
| rw [mem_smul_set_iff_inv_smul_memβ hk, p.mem_ball_zero, p.mem_ball_zero, map_smul_eq_mul,
norm_inv, β div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hk), mul_comm] | theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) := by
ext
| Mathlib.Analysis.Seminorm.1013_0.ywwMCgoKeIFKDZ3 | theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
x : E
p : Seminorm π E
k : π
r : β
β’ k β’ closedBall p 0 r β closedBall p 0 (βkβ * r) | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_ball_zero, map_smul_eq_mul, norm_inv, β
mul_lt_mul_left <| norm_pos_iff.mpr hk, β mul_assoc, β div_eq_mul_inv βkβ βkβ,
div_self (ne_of_gt <| norm_pos_iff.mpr hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self hk, one_smul]
#align seminorm.ball_norm_mul_subset Seminorm.ball_norm_mul_subset
theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) := by
ext
rw [mem_smul_set_iff_inv_smul_memβ hk, p.mem_ball_zero, p.mem_ball_zero, map_smul_eq_mul,
norm_inv, β div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hk), mul_comm]
#align seminorm.smul_ball_zero Seminorm.smul_ball_zero
theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) := by
| rintro x β¨y, hy, hβ© | theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) := by
| Mathlib.Analysis.Seminorm.1020_0.ywwMCgoKeIFKDZ3 | theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) | Mathlib_Analysis_Seminorm |
case intro.intro
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
xβ : E
p : Seminorm π E
k : π
r : β
x y : E
hy : y β closedBall p 0 r
h : (fun x => k β’ x) y = x
β’ x β closedBall p 0 (βkβ * r) | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_ball_zero, map_smul_eq_mul, norm_inv, β
mul_lt_mul_left <| norm_pos_iff.mpr hk, β mul_assoc, β div_eq_mul_inv βkβ βkβ,
div_self (ne_of_gt <| norm_pos_iff.mpr hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self hk, one_smul]
#align seminorm.ball_norm_mul_subset Seminorm.ball_norm_mul_subset
theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) := by
ext
rw [mem_smul_set_iff_inv_smul_memβ hk, p.mem_ball_zero, p.mem_ball_zero, map_smul_eq_mul,
norm_inv, β div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hk), mul_comm]
#align seminorm.smul_ball_zero Seminorm.smul_ball_zero
theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) := by
rintro x β¨y, hy, hβ©
| rw [Seminorm.mem_closedBall_zero, β h, map_smul_eq_mul] | theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) := by
rintro x β¨y, hy, hβ©
| Mathlib.Analysis.Seminorm.1020_0.ywwMCgoKeIFKDZ3 | theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) | Mathlib_Analysis_Seminorm |
case intro.intro
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
xβ : E
p : Seminorm π E
k : π
r : β
x y : E
hy : y β closedBall p 0 r
h : (fun x => k β’ x) y = x
β’ βkβ * p y β€ βkβ * r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_ball_zero, map_smul_eq_mul, norm_inv, β
mul_lt_mul_left <| norm_pos_iff.mpr hk, β mul_assoc, β div_eq_mul_inv βkβ βkβ,
div_self (ne_of_gt <| norm_pos_iff.mpr hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self hk, one_smul]
#align seminorm.ball_norm_mul_subset Seminorm.ball_norm_mul_subset
theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) := by
ext
rw [mem_smul_set_iff_inv_smul_memβ hk, p.mem_ball_zero, p.mem_ball_zero, map_smul_eq_mul,
norm_inv, β div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hk), mul_comm]
#align seminorm.smul_ball_zero Seminorm.smul_ball_zero
theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) := by
rintro x β¨y, hy, hβ©
rw [Seminorm.mem_closedBall_zero, β h, map_smul_eq_mul]
| rw [Seminorm.mem_closedBall_zero] at hy | theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) := by
rintro x β¨y, hy, hβ©
rw [Seminorm.mem_closedBall_zero, β h, map_smul_eq_mul]
| Mathlib.Analysis.Seminorm.1020_0.ywwMCgoKeIFKDZ3 | theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) | Mathlib_Analysis_Seminorm |
case intro.intro
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
xβ : E
p : Seminorm π E
k : π
r : β
x y : E
hy : p y β€ r
h : (fun x => k β’ x) y = x
β’ βkβ * p y β€ βkβ * r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_ball_zero, map_smul_eq_mul, norm_inv, β
mul_lt_mul_left <| norm_pos_iff.mpr hk, β mul_assoc, β div_eq_mul_inv βkβ βkβ,
div_self (ne_of_gt <| norm_pos_iff.mpr hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self hk, one_smul]
#align seminorm.ball_norm_mul_subset Seminorm.ball_norm_mul_subset
theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) := by
ext
rw [mem_smul_set_iff_inv_smul_memβ hk, p.mem_ball_zero, p.mem_ball_zero, map_smul_eq_mul,
norm_inv, β div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hk), mul_comm]
#align seminorm.smul_ball_zero Seminorm.smul_ball_zero
theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) := by
rintro x β¨y, hy, hβ©
rw [Seminorm.mem_closedBall_zero, β h, map_smul_eq_mul]
rw [Seminorm.mem_closedBall_zero] at hy
| gcongr | theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) := by
rintro x β¨y, hy, hβ©
rw [Seminorm.mem_closedBall_zero, β h, map_smul_eq_mul]
rw [Seminorm.mem_closedBall_zero] at hy
| Mathlib.Analysis.Seminorm.1020_0.ywwMCgoKeIFKDZ3 | theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
x : E
p : Seminorm π E
k : π
r : β
hk : 0 < βkβ
β’ k β’ closedBall p 0 r = closedBall p 0 (βkβ * r) | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_ball_zero, map_smul_eq_mul, norm_inv, β
mul_lt_mul_left <| norm_pos_iff.mpr hk, β mul_assoc, β div_eq_mul_inv βkβ βkβ,
div_self (ne_of_gt <| norm_pos_iff.mpr hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self hk, one_smul]
#align seminorm.ball_norm_mul_subset Seminorm.ball_norm_mul_subset
theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) := by
ext
rw [mem_smul_set_iff_inv_smul_memβ hk, p.mem_ball_zero, p.mem_ball_zero, map_smul_eq_mul,
norm_inv, β div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hk), mul_comm]
#align seminorm.smul_ball_zero Seminorm.smul_ball_zero
theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) := by
rintro x β¨y, hy, hβ©
rw [Seminorm.mem_closedBall_zero, β h, map_smul_eq_mul]
rw [Seminorm.mem_closedBall_zero] at hy
gcongr
#align seminorm.smul_closed_ball_subset Seminorm.smul_closedBall_subset
theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) := by
| refine' subset_antisymm smul_closedBall_subset _ | theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) := by
| Mathlib.Analysis.Seminorm.1028_0.ywwMCgoKeIFKDZ3 | theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
x : E
p : Seminorm π E
k : π
r : β
hk : 0 < βkβ
β’ closedBall p 0 (βkβ * r) β k β’ closedBall p 0 r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_ball_zero, map_smul_eq_mul, norm_inv, β
mul_lt_mul_left <| norm_pos_iff.mpr hk, β mul_assoc, β div_eq_mul_inv βkβ βkβ,
div_self (ne_of_gt <| norm_pos_iff.mpr hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self hk, one_smul]
#align seminorm.ball_norm_mul_subset Seminorm.ball_norm_mul_subset
theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) := by
ext
rw [mem_smul_set_iff_inv_smul_memβ hk, p.mem_ball_zero, p.mem_ball_zero, map_smul_eq_mul,
norm_inv, β div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hk), mul_comm]
#align seminorm.smul_ball_zero Seminorm.smul_ball_zero
theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) := by
rintro x β¨y, hy, hβ©
rw [Seminorm.mem_closedBall_zero, β h, map_smul_eq_mul]
rw [Seminorm.mem_closedBall_zero] at hy
gcongr
#align seminorm.smul_closed_ball_subset Seminorm.smul_closedBall_subset
theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) := by
refine' subset_antisymm smul_closedBall_subset _
| intro x | theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) := by
refine' subset_antisymm smul_closedBall_subset _
| Mathlib.Analysis.Seminorm.1028_0.ywwMCgoKeIFKDZ3 | theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
xβ : E
p : Seminorm π E
k : π
r : β
hk : 0 < βkβ
x : E
β’ x β closedBall p 0 (βkβ * r) β x β k β’ closedBall p 0 r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_ball_zero, map_smul_eq_mul, norm_inv, β
mul_lt_mul_left <| norm_pos_iff.mpr hk, β mul_assoc, β div_eq_mul_inv βkβ βkβ,
div_self (ne_of_gt <| norm_pos_iff.mpr hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self hk, one_smul]
#align seminorm.ball_norm_mul_subset Seminorm.ball_norm_mul_subset
theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) := by
ext
rw [mem_smul_set_iff_inv_smul_memβ hk, p.mem_ball_zero, p.mem_ball_zero, map_smul_eq_mul,
norm_inv, β div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hk), mul_comm]
#align seminorm.smul_ball_zero Seminorm.smul_ball_zero
theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) := by
rintro x β¨y, hy, hβ©
rw [Seminorm.mem_closedBall_zero, β h, map_smul_eq_mul]
rw [Seminorm.mem_closedBall_zero] at hy
gcongr
#align seminorm.smul_closed_ball_subset Seminorm.smul_closedBall_subset
theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) := by
refine' subset_antisymm smul_closedBall_subset _
intro x
| rw [Set.mem_smul_set, Seminorm.mem_closedBall_zero] | theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) := by
refine' subset_antisymm smul_closedBall_subset _
intro x
| Mathlib.Analysis.Seminorm.1028_0.ywwMCgoKeIFKDZ3 | theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
xβ : E
p : Seminorm π E
k : π
r : β
hk : 0 < βkβ
x : E
β’ p x β€ βkβ * r β β y β closedBall p 0 r, k β’ y = x | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_ball_zero, map_smul_eq_mul, norm_inv, β
mul_lt_mul_left <| norm_pos_iff.mpr hk, β mul_assoc, β div_eq_mul_inv βkβ βkβ,
div_self (ne_of_gt <| norm_pos_iff.mpr hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self hk, one_smul]
#align seminorm.ball_norm_mul_subset Seminorm.ball_norm_mul_subset
theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) := by
ext
rw [mem_smul_set_iff_inv_smul_memβ hk, p.mem_ball_zero, p.mem_ball_zero, map_smul_eq_mul,
norm_inv, β div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hk), mul_comm]
#align seminorm.smul_ball_zero Seminorm.smul_ball_zero
theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) := by
rintro x β¨y, hy, hβ©
rw [Seminorm.mem_closedBall_zero, β h, map_smul_eq_mul]
rw [Seminorm.mem_closedBall_zero] at hy
gcongr
#align seminorm.smul_closed_ball_subset Seminorm.smul_closedBall_subset
theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) := by
refine' subset_antisymm smul_closedBall_subset _
intro x
rw [Set.mem_smul_set, Seminorm.mem_closedBall_zero]
| refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β© | theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) := by
refine' subset_antisymm smul_closedBall_subset _
intro x
rw [Set.mem_smul_set, Seminorm.mem_closedBall_zero]
| Mathlib.Analysis.Seminorm.1028_0.ywwMCgoKeIFKDZ3 | theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) | Mathlib_Analysis_Seminorm |
case refine'_1
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
xβ : E
p : Seminorm π E
k : π
r : β
hk : 0 < βkβ
x : E
hx : p x β€ βkβ * r
β’ kβ»ΒΉ β’ x β closedBall p 0 r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_ball_zero, map_smul_eq_mul, norm_inv, β
mul_lt_mul_left <| norm_pos_iff.mpr hk, β mul_assoc, β div_eq_mul_inv βkβ βkβ,
div_self (ne_of_gt <| norm_pos_iff.mpr hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self hk, one_smul]
#align seminorm.ball_norm_mul_subset Seminorm.ball_norm_mul_subset
theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) := by
ext
rw [mem_smul_set_iff_inv_smul_memβ hk, p.mem_ball_zero, p.mem_ball_zero, map_smul_eq_mul,
norm_inv, β div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hk), mul_comm]
#align seminorm.smul_ball_zero Seminorm.smul_ball_zero
theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) := by
rintro x β¨y, hy, hβ©
rw [Seminorm.mem_closedBall_zero, β h, map_smul_eq_mul]
rw [Seminorm.mem_closedBall_zero] at hy
gcongr
#align seminorm.smul_closed_ball_subset Seminorm.smul_closedBall_subset
theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) := by
refine' subset_antisymm smul_closedBall_subset _
intro x
rw [Set.mem_smul_set, Seminorm.mem_closedBall_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· | rwa [Seminorm.mem_closedBall_zero, map_smul_eq_mul, norm_inv, β mul_le_mul_left hk, β mul_assoc,
β div_eq_mul_inv βkβ βkβ, div_self (ne_of_gt hk), one_mul] | theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) := by
refine' subset_antisymm smul_closedBall_subset _
intro x
rw [Set.mem_smul_set, Seminorm.mem_closedBall_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· | Mathlib.Analysis.Seminorm.1028_0.ywwMCgoKeIFKDZ3 | theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) | Mathlib_Analysis_Seminorm |
case refine'_2
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
xβ : E
p : Seminorm π E
k : π
r : β
hk : 0 < βkβ
x : E
hx : p x β€ βkβ * r
β’ k β’ kβ»ΒΉ β’ x = x | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_ball_zero, map_smul_eq_mul, norm_inv, β
mul_lt_mul_left <| norm_pos_iff.mpr hk, β mul_assoc, β div_eq_mul_inv βkβ βkβ,
div_self (ne_of_gt <| norm_pos_iff.mpr hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self hk, one_smul]
#align seminorm.ball_norm_mul_subset Seminorm.ball_norm_mul_subset
theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) := by
ext
rw [mem_smul_set_iff_inv_smul_memβ hk, p.mem_ball_zero, p.mem_ball_zero, map_smul_eq_mul,
norm_inv, β div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hk), mul_comm]
#align seminorm.smul_ball_zero Seminorm.smul_ball_zero
theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) := by
rintro x β¨y, hy, hβ©
rw [Seminorm.mem_closedBall_zero, β h, map_smul_eq_mul]
rw [Seminorm.mem_closedBall_zero] at hy
gcongr
#align seminorm.smul_closed_ball_subset Seminorm.smul_closedBall_subset
theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) := by
refine' subset_antisymm smul_closedBall_subset _
intro x
rw [Set.mem_smul_set, Seminorm.mem_closedBall_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_closedBall_zero, map_smul_eq_mul, norm_inv, β mul_le_mul_left hk, β mul_assoc,
β div_eq_mul_inv βkβ βkβ, div_self (ne_of_gt hk), one_mul]
| rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self (norm_pos_iff.mp hk), one_smul] | theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) := by
refine' subset_antisymm smul_closedBall_subset _
intro x
rw [Set.mem_smul_set, Seminorm.mem_closedBall_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_closedBall_zero, map_smul_eq_mul, norm_inv, β mul_le_mul_left hk, β mul_assoc,
β div_eq_mul_inv βkβ βkβ, div_self (ne_of_gt hk), one_mul]
| Mathlib.Analysis.Seminorm.1028_0.ywwMCgoKeIFKDZ3 | theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
r : β
x : E
p : Seminorm π E
rβ rβ : β
hrβ : 0 < rβ
β’ Absorbs π (ball p 0 rβ) (ball p 0 rβ) | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_ball_zero, map_smul_eq_mul, norm_inv, β
mul_lt_mul_left <| norm_pos_iff.mpr hk, β mul_assoc, β div_eq_mul_inv βkβ βkβ,
div_self (ne_of_gt <| norm_pos_iff.mpr hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self hk, one_smul]
#align seminorm.ball_norm_mul_subset Seminorm.ball_norm_mul_subset
theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) := by
ext
rw [mem_smul_set_iff_inv_smul_memβ hk, p.mem_ball_zero, p.mem_ball_zero, map_smul_eq_mul,
norm_inv, β div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hk), mul_comm]
#align seminorm.smul_ball_zero Seminorm.smul_ball_zero
theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) := by
rintro x β¨y, hy, hβ©
rw [Seminorm.mem_closedBall_zero, β h, map_smul_eq_mul]
rw [Seminorm.mem_closedBall_zero] at hy
gcongr
#align seminorm.smul_closed_ball_subset Seminorm.smul_closedBall_subset
theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) := by
refine' subset_antisymm smul_closedBall_subset _
intro x
rw [Set.mem_smul_set, Seminorm.mem_closedBall_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_closedBall_zero, map_smul_eq_mul, norm_inv, β mul_le_mul_left hk, β mul_assoc,
β div_eq_mul_inv βkβ βkβ, div_self (ne_of_gt hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self (norm_pos_iff.mp hk), one_smul]
#align seminorm.smul_closed_ball_zero Seminorm.smul_closedBall_zero
theorem ball_zero_absorbs_ball_zero (p : Seminorm π E) {rβ rβ : β} (hrβ : 0 < rβ) :
Absorbs π (p.ball 0 rβ) (p.ball 0 rβ) := by
| rcases exists_pos_lt_mul hrβ rβ with β¨r, hrβ, hrβ© | theorem ball_zero_absorbs_ball_zero (p : Seminorm π E) {rβ rβ : β} (hrβ : 0 < rβ) :
Absorbs π (p.ball 0 rβ) (p.ball 0 rβ) := by
| Mathlib.Analysis.Seminorm.1039_0.ywwMCgoKeIFKDZ3 | theorem ball_zero_absorbs_ball_zero (p : Seminorm π E) {rβ rβ : β} (hrβ : 0 < rβ) :
Absorbs π (p.ball 0 rβ) (p.ball 0 rβ) | Mathlib_Analysis_Seminorm |
case intro.intro
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
a : π
rβ : β
x : E
p : Seminorm π E
rβ rβ : β
hrβ : 0 < rβ
r : β
hrβ : 0 < r
hr : rβ < r * rβ
β’ Absorbs π (ball p 0 rβ) (ball p 0 rβ) | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_ball_zero, map_smul_eq_mul, norm_inv, β
mul_lt_mul_left <| norm_pos_iff.mpr hk, β mul_assoc, β div_eq_mul_inv βkβ βkβ,
div_self (ne_of_gt <| norm_pos_iff.mpr hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self hk, one_smul]
#align seminorm.ball_norm_mul_subset Seminorm.ball_norm_mul_subset
theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) := by
ext
rw [mem_smul_set_iff_inv_smul_memβ hk, p.mem_ball_zero, p.mem_ball_zero, map_smul_eq_mul,
norm_inv, β div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hk), mul_comm]
#align seminorm.smul_ball_zero Seminorm.smul_ball_zero
theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) := by
rintro x β¨y, hy, hβ©
rw [Seminorm.mem_closedBall_zero, β h, map_smul_eq_mul]
rw [Seminorm.mem_closedBall_zero] at hy
gcongr
#align seminorm.smul_closed_ball_subset Seminorm.smul_closedBall_subset
theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) := by
refine' subset_antisymm smul_closedBall_subset _
intro x
rw [Set.mem_smul_set, Seminorm.mem_closedBall_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_closedBall_zero, map_smul_eq_mul, norm_inv, β mul_le_mul_left hk, β mul_assoc,
β div_eq_mul_inv βkβ βkβ, div_self (ne_of_gt hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self (norm_pos_iff.mp hk), one_smul]
#align seminorm.smul_closed_ball_zero Seminorm.smul_closedBall_zero
theorem ball_zero_absorbs_ball_zero (p : Seminorm π E) {rβ rβ : β} (hrβ : 0 < rβ) :
Absorbs π (p.ball 0 rβ) (p.ball 0 rβ) := by
rcases exists_pos_lt_mul hrβ rβ with β¨r, hrβ, hrβ©
| refine' β¨r, hrβ, fun a ha x hx => _β© | theorem ball_zero_absorbs_ball_zero (p : Seminorm π E) {rβ rβ : β} (hrβ : 0 < rβ) :
Absorbs π (p.ball 0 rβ) (p.ball 0 rβ) := by
rcases exists_pos_lt_mul hrβ rβ with β¨r, hrβ, hrβ©
| Mathlib.Analysis.Seminorm.1039_0.ywwMCgoKeIFKDZ3 | theorem ball_zero_absorbs_ball_zero (p : Seminorm π E) {rβ rβ : β} (hrβ : 0 < rβ) :
Absorbs π (p.ball 0 rβ) (p.ball 0 rβ) | Mathlib_Analysis_Seminorm |
case intro.intro
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
aβ : π
rβ : β
xβ : E
p : Seminorm π E
rβ rβ : β
hrβ : 0 < rβ
r : β
hrβ : 0 < r
hr : rβ < r * rβ
a : π
ha : r β€ βaβ
x : E
hx : x β ball p 0 rβ
β’ x β a β’ ball p 0 rβ | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_ball_zero, map_smul_eq_mul, norm_inv, β
mul_lt_mul_left <| norm_pos_iff.mpr hk, β mul_assoc, β div_eq_mul_inv βkβ βkβ,
div_self (ne_of_gt <| norm_pos_iff.mpr hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self hk, one_smul]
#align seminorm.ball_norm_mul_subset Seminorm.ball_norm_mul_subset
theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) := by
ext
rw [mem_smul_set_iff_inv_smul_memβ hk, p.mem_ball_zero, p.mem_ball_zero, map_smul_eq_mul,
norm_inv, β div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hk), mul_comm]
#align seminorm.smul_ball_zero Seminorm.smul_ball_zero
theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) := by
rintro x β¨y, hy, hβ©
rw [Seminorm.mem_closedBall_zero, β h, map_smul_eq_mul]
rw [Seminorm.mem_closedBall_zero] at hy
gcongr
#align seminorm.smul_closed_ball_subset Seminorm.smul_closedBall_subset
theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) := by
refine' subset_antisymm smul_closedBall_subset _
intro x
rw [Set.mem_smul_set, Seminorm.mem_closedBall_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_closedBall_zero, map_smul_eq_mul, norm_inv, β mul_le_mul_left hk, β mul_assoc,
β div_eq_mul_inv βkβ βkβ, div_self (ne_of_gt hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self (norm_pos_iff.mp hk), one_smul]
#align seminorm.smul_closed_ball_zero Seminorm.smul_closedBall_zero
theorem ball_zero_absorbs_ball_zero (p : Seminorm π E) {rβ rβ : β} (hrβ : 0 < rβ) :
Absorbs π (p.ball 0 rβ) (p.ball 0 rβ) := by
rcases exists_pos_lt_mul hrβ rβ with β¨r, hrβ, hrβ©
refine' β¨r, hrβ, fun a ha x hx => _β©
| rw [smul_ball_zero (norm_pos_iff.1 <| hrβ.trans_le ha), p.mem_ball_zero] | theorem ball_zero_absorbs_ball_zero (p : Seminorm π E) {rβ rβ : β} (hrβ : 0 < rβ) :
Absorbs π (p.ball 0 rβ) (p.ball 0 rβ) := by
rcases exists_pos_lt_mul hrβ rβ with β¨r, hrβ, hrβ©
refine' β¨r, hrβ, fun a ha x hx => _β©
| Mathlib.Analysis.Seminorm.1039_0.ywwMCgoKeIFKDZ3 | theorem ball_zero_absorbs_ball_zero (p : Seminorm π E) {rβ rβ : β} (hrβ : 0 < rβ) :
Absorbs π (p.ball 0 rβ) (p.ball 0 rβ) | Mathlib_Analysis_Seminorm |
case intro.intro
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
aβ : π
rβ : β
xβ : E
p : Seminorm π E
rβ rβ : β
hrβ : 0 < rβ
r : β
hrβ : 0 < r
hr : rβ < r * rβ
a : π
ha : r β€ βaβ
x : E
hx : x β ball p 0 rβ
β’ p x < βaβ * rβ | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_ball_zero, map_smul_eq_mul, norm_inv, β
mul_lt_mul_left <| norm_pos_iff.mpr hk, β mul_assoc, β div_eq_mul_inv βkβ βkβ,
div_self (ne_of_gt <| norm_pos_iff.mpr hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self hk, one_smul]
#align seminorm.ball_norm_mul_subset Seminorm.ball_norm_mul_subset
theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) := by
ext
rw [mem_smul_set_iff_inv_smul_memβ hk, p.mem_ball_zero, p.mem_ball_zero, map_smul_eq_mul,
norm_inv, β div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hk), mul_comm]
#align seminorm.smul_ball_zero Seminorm.smul_ball_zero
theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) := by
rintro x β¨y, hy, hβ©
rw [Seminorm.mem_closedBall_zero, β h, map_smul_eq_mul]
rw [Seminorm.mem_closedBall_zero] at hy
gcongr
#align seminorm.smul_closed_ball_subset Seminorm.smul_closedBall_subset
theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) := by
refine' subset_antisymm smul_closedBall_subset _
intro x
rw [Set.mem_smul_set, Seminorm.mem_closedBall_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_closedBall_zero, map_smul_eq_mul, norm_inv, β mul_le_mul_left hk, β mul_assoc,
β div_eq_mul_inv βkβ βkβ, div_self (ne_of_gt hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self (norm_pos_iff.mp hk), one_smul]
#align seminorm.smul_closed_ball_zero Seminorm.smul_closedBall_zero
theorem ball_zero_absorbs_ball_zero (p : Seminorm π E) {rβ rβ : β} (hrβ : 0 < rβ) :
Absorbs π (p.ball 0 rβ) (p.ball 0 rβ) := by
rcases exists_pos_lt_mul hrβ rβ with β¨r, hrβ, hrβ©
refine' β¨r, hrβ, fun a ha x hx => _β©
rw [smul_ball_zero (norm_pos_iff.1 <| hrβ.trans_le ha), p.mem_ball_zero]
| rw [p.mem_ball_zero] at hx | theorem ball_zero_absorbs_ball_zero (p : Seminorm π E) {rβ rβ : β} (hrβ : 0 < rβ) :
Absorbs π (p.ball 0 rβ) (p.ball 0 rβ) := by
rcases exists_pos_lt_mul hrβ rβ with β¨r, hrβ, hrβ©
refine' β¨r, hrβ, fun a ha x hx => _β©
rw [smul_ball_zero (norm_pos_iff.1 <| hrβ.trans_le ha), p.mem_ball_zero]
| Mathlib.Analysis.Seminorm.1039_0.ywwMCgoKeIFKDZ3 | theorem ball_zero_absorbs_ball_zero (p : Seminorm π E) {rβ rβ : β} (hrβ : 0 < rβ) :
Absorbs π (p.ball 0 rβ) (p.ball 0 rβ) | Mathlib_Analysis_Seminorm |
case intro.intro
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
aβ : π
rβ : β
xβ : E
p : Seminorm π E
rβ rβ : β
hrβ : 0 < rβ
r : β
hrβ : 0 < r
hr : rβ < r * rβ
a : π
ha : r β€ βaβ
x : E
hx : p x < rβ
β’ p x < βaβ * rβ | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_ball_zero, map_smul_eq_mul, norm_inv, β
mul_lt_mul_left <| norm_pos_iff.mpr hk, β mul_assoc, β div_eq_mul_inv βkβ βkβ,
div_self (ne_of_gt <| norm_pos_iff.mpr hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self hk, one_smul]
#align seminorm.ball_norm_mul_subset Seminorm.ball_norm_mul_subset
theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) := by
ext
rw [mem_smul_set_iff_inv_smul_memβ hk, p.mem_ball_zero, p.mem_ball_zero, map_smul_eq_mul,
norm_inv, β div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hk), mul_comm]
#align seminorm.smul_ball_zero Seminorm.smul_ball_zero
theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) := by
rintro x β¨y, hy, hβ©
rw [Seminorm.mem_closedBall_zero, β h, map_smul_eq_mul]
rw [Seminorm.mem_closedBall_zero] at hy
gcongr
#align seminorm.smul_closed_ball_subset Seminorm.smul_closedBall_subset
theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) := by
refine' subset_antisymm smul_closedBall_subset _
intro x
rw [Set.mem_smul_set, Seminorm.mem_closedBall_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_closedBall_zero, map_smul_eq_mul, norm_inv, β mul_le_mul_left hk, β mul_assoc,
β div_eq_mul_inv βkβ βkβ, div_self (ne_of_gt hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self (norm_pos_iff.mp hk), one_smul]
#align seminorm.smul_closed_ball_zero Seminorm.smul_closedBall_zero
theorem ball_zero_absorbs_ball_zero (p : Seminorm π E) {rβ rβ : β} (hrβ : 0 < rβ) :
Absorbs π (p.ball 0 rβ) (p.ball 0 rβ) := by
rcases exists_pos_lt_mul hrβ rβ with β¨r, hrβ, hrβ©
refine' β¨r, hrβ, fun a ha x hx => _β©
rw [smul_ball_zero (norm_pos_iff.1 <| hrβ.trans_le ha), p.mem_ball_zero]
rw [p.mem_ball_zero] at hx
| exact hx.trans (hr.trans_le <| by gcongr) | theorem ball_zero_absorbs_ball_zero (p : Seminorm π E) {rβ rβ : β} (hrβ : 0 < rβ) :
Absorbs π (p.ball 0 rβ) (p.ball 0 rβ) := by
rcases exists_pos_lt_mul hrβ rβ with β¨r, hrβ, hrβ©
refine' β¨r, hrβ, fun a ha x hx => _β©
rw [smul_ball_zero (norm_pos_iff.1 <| hrβ.trans_le ha), p.mem_ball_zero]
rw [p.mem_ball_zero] at hx
| Mathlib.Analysis.Seminorm.1039_0.ywwMCgoKeIFKDZ3 | theorem ball_zero_absorbs_ball_zero (p : Seminorm π E) {rβ rβ : β} (hrβ : 0 < rβ) :
Absorbs π (p.ball 0 rβ) (p.ball 0 rβ) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
pβ : Seminorm π E
A B : Set E
aβ : π
rβ : β
xβ : E
p : Seminorm π E
rβ rβ : β
hrβ : 0 < rβ
r : β
hrβ : 0 < r
hr : rβ < r * rβ
a : π
ha : r β€ βaβ
x : E
hx : p x < rβ
β’ r * rβ β€ βaβ * rβ | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_ball_zero, map_smul_eq_mul, norm_inv, β
mul_lt_mul_left <| norm_pos_iff.mpr hk, β mul_assoc, β div_eq_mul_inv βkβ βkβ,
div_self (ne_of_gt <| norm_pos_iff.mpr hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self hk, one_smul]
#align seminorm.ball_norm_mul_subset Seminorm.ball_norm_mul_subset
theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) := by
ext
rw [mem_smul_set_iff_inv_smul_memβ hk, p.mem_ball_zero, p.mem_ball_zero, map_smul_eq_mul,
norm_inv, β div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hk), mul_comm]
#align seminorm.smul_ball_zero Seminorm.smul_ball_zero
theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) := by
rintro x β¨y, hy, hβ©
rw [Seminorm.mem_closedBall_zero, β h, map_smul_eq_mul]
rw [Seminorm.mem_closedBall_zero] at hy
gcongr
#align seminorm.smul_closed_ball_subset Seminorm.smul_closedBall_subset
theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) := by
refine' subset_antisymm smul_closedBall_subset _
intro x
rw [Set.mem_smul_set, Seminorm.mem_closedBall_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_closedBall_zero, map_smul_eq_mul, norm_inv, β mul_le_mul_left hk, β mul_assoc,
β div_eq_mul_inv βkβ βkβ, div_self (ne_of_gt hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self (norm_pos_iff.mp hk), one_smul]
#align seminorm.smul_closed_ball_zero Seminorm.smul_closedBall_zero
theorem ball_zero_absorbs_ball_zero (p : Seminorm π E) {rβ rβ : β} (hrβ : 0 < rβ) :
Absorbs π (p.ball 0 rβ) (p.ball 0 rβ) := by
rcases exists_pos_lt_mul hrβ rβ with β¨r, hrβ, hrβ©
refine' β¨r, hrβ, fun a ha x hx => _β©
rw [smul_ball_zero (norm_pos_iff.1 <| hrβ.trans_le ha), p.mem_ball_zero]
rw [p.mem_ball_zero] at hx
exact hx.trans (hr.trans_le <| by | gcongr | theorem ball_zero_absorbs_ball_zero (p : Seminorm π E) {rβ rβ : β} (hrβ : 0 < rβ) :
Absorbs π (p.ball 0 rβ) (p.ball 0 rβ) := by
rcases exists_pos_lt_mul hrβ rβ with β¨r, hrβ, hrβ©
refine' β¨r, hrβ, fun a ha x hx => _β©
rw [smul_ball_zero (norm_pos_iff.1 <| hrβ.trans_le ha), p.mem_ball_zero]
rw [p.mem_ball_zero] at hx
exact hx.trans (hr.trans_le <| by | Mathlib.Analysis.Seminorm.1039_0.ywwMCgoKeIFKDZ3 | theorem ball_zero_absorbs_ball_zero (p : Seminorm π E) {rβ rβ : β} (hrβ : 0 < rβ) :
Absorbs π (p.ball 0 rβ) (p.ball 0 rβ) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
p : Seminorm π E
A B : Set E
a : π
r : β
x : E
hpr : p x < r
β’ Absorbent π (ball p x r) | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_ball_zero, map_smul_eq_mul, norm_inv, β
mul_lt_mul_left <| norm_pos_iff.mpr hk, β mul_assoc, β div_eq_mul_inv βkβ βkβ,
div_self (ne_of_gt <| norm_pos_iff.mpr hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self hk, one_smul]
#align seminorm.ball_norm_mul_subset Seminorm.ball_norm_mul_subset
theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) := by
ext
rw [mem_smul_set_iff_inv_smul_memβ hk, p.mem_ball_zero, p.mem_ball_zero, map_smul_eq_mul,
norm_inv, β div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hk), mul_comm]
#align seminorm.smul_ball_zero Seminorm.smul_ball_zero
theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) := by
rintro x β¨y, hy, hβ©
rw [Seminorm.mem_closedBall_zero, β h, map_smul_eq_mul]
rw [Seminorm.mem_closedBall_zero] at hy
gcongr
#align seminorm.smul_closed_ball_subset Seminorm.smul_closedBall_subset
theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) := by
refine' subset_antisymm smul_closedBall_subset _
intro x
rw [Set.mem_smul_set, Seminorm.mem_closedBall_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_closedBall_zero, map_smul_eq_mul, norm_inv, β mul_le_mul_left hk, β mul_assoc,
β div_eq_mul_inv βkβ βkβ, div_self (ne_of_gt hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self (norm_pos_iff.mp hk), one_smul]
#align seminorm.smul_closed_ball_zero Seminorm.smul_closedBall_zero
theorem ball_zero_absorbs_ball_zero (p : Seminorm π E) {rβ rβ : β} (hrβ : 0 < rβ) :
Absorbs π (p.ball 0 rβ) (p.ball 0 rβ) := by
rcases exists_pos_lt_mul hrβ rβ with β¨r, hrβ, hrβ©
refine' β¨r, hrβ, fun a ha x hx => _β©
rw [smul_ball_zero (norm_pos_iff.1 <| hrβ.trans_le ha), p.mem_ball_zero]
rw [p.mem_ball_zero] at hx
exact hx.trans (hr.trans_le <| by gcongr)
#align seminorm.ball_zero_absorbs_ball_zero Seminorm.ball_zero_absorbs_ball_zero
/-- Seminorm-balls at the origin are absorbent. -/
protected theorem absorbent_ball_zero (hr : 0 < r) : Absorbent π (ball p (0 : E) r) :=
absorbent_iff_forall_absorbs_singleton.2 fun _ =>
(p.ball_zero_absorbs_ball_zero hr).mono_right <|
singleton_subset_iff.2 <| p.mem_ball_zero.2 <| lt_add_one _
#align seminorm.absorbent_ball_zero Seminorm.absorbent_ball_zero
/-- Closed seminorm-balls at the origin are absorbent. -/
protected theorem absorbent_closedBall_zero (hr : 0 < r) : Absorbent π (closedBall p (0 : E) r) :=
(p.absorbent_ball_zero hr).subset (p.ball_subset_closedBall _ _)
#align seminorm.absorbent_closed_ball_zero Seminorm.absorbent_closedBall_zero
/-- Seminorm-balls containing the origin are absorbent. -/
protected theorem absorbent_ball (hpr : p x < r) : Absorbent π (ball p x r) := by
| refine' (p.absorbent_ball_zero <| sub_pos.2 hpr).subset fun y hy => _ | /-- Seminorm-balls containing the origin are absorbent. -/
protected theorem absorbent_ball (hpr : p x < r) : Absorbent π (ball p x r) := by
| Mathlib.Analysis.Seminorm.1060_0.ywwMCgoKeIFKDZ3 | /-- Seminorm-balls containing the origin are absorbent. -/
protected theorem absorbent_ball (hpr : p x < r) : Absorbent π (ball p x r) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
p : Seminorm π E
A B : Set E
a : π
r : β
x : E
hpr : p x < r
y : E
hy : y β ball p 0 (r - p x)
β’ y β ball p x r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_ball_zero, map_smul_eq_mul, norm_inv, β
mul_lt_mul_left <| norm_pos_iff.mpr hk, β mul_assoc, β div_eq_mul_inv βkβ βkβ,
div_self (ne_of_gt <| norm_pos_iff.mpr hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self hk, one_smul]
#align seminorm.ball_norm_mul_subset Seminorm.ball_norm_mul_subset
theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) := by
ext
rw [mem_smul_set_iff_inv_smul_memβ hk, p.mem_ball_zero, p.mem_ball_zero, map_smul_eq_mul,
norm_inv, β div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hk), mul_comm]
#align seminorm.smul_ball_zero Seminorm.smul_ball_zero
theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) := by
rintro x β¨y, hy, hβ©
rw [Seminorm.mem_closedBall_zero, β h, map_smul_eq_mul]
rw [Seminorm.mem_closedBall_zero] at hy
gcongr
#align seminorm.smul_closed_ball_subset Seminorm.smul_closedBall_subset
theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) := by
refine' subset_antisymm smul_closedBall_subset _
intro x
rw [Set.mem_smul_set, Seminorm.mem_closedBall_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_closedBall_zero, map_smul_eq_mul, norm_inv, β mul_le_mul_left hk, β mul_assoc,
β div_eq_mul_inv βkβ βkβ, div_self (ne_of_gt hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self (norm_pos_iff.mp hk), one_smul]
#align seminorm.smul_closed_ball_zero Seminorm.smul_closedBall_zero
theorem ball_zero_absorbs_ball_zero (p : Seminorm π E) {rβ rβ : β} (hrβ : 0 < rβ) :
Absorbs π (p.ball 0 rβ) (p.ball 0 rβ) := by
rcases exists_pos_lt_mul hrβ rβ with β¨r, hrβ, hrβ©
refine' β¨r, hrβ, fun a ha x hx => _β©
rw [smul_ball_zero (norm_pos_iff.1 <| hrβ.trans_le ha), p.mem_ball_zero]
rw [p.mem_ball_zero] at hx
exact hx.trans (hr.trans_le <| by gcongr)
#align seminorm.ball_zero_absorbs_ball_zero Seminorm.ball_zero_absorbs_ball_zero
/-- Seminorm-balls at the origin are absorbent. -/
protected theorem absorbent_ball_zero (hr : 0 < r) : Absorbent π (ball p (0 : E) r) :=
absorbent_iff_forall_absorbs_singleton.2 fun _ =>
(p.ball_zero_absorbs_ball_zero hr).mono_right <|
singleton_subset_iff.2 <| p.mem_ball_zero.2 <| lt_add_one _
#align seminorm.absorbent_ball_zero Seminorm.absorbent_ball_zero
/-- Closed seminorm-balls at the origin are absorbent. -/
protected theorem absorbent_closedBall_zero (hr : 0 < r) : Absorbent π (closedBall p (0 : E) r) :=
(p.absorbent_ball_zero hr).subset (p.ball_subset_closedBall _ _)
#align seminorm.absorbent_closed_ball_zero Seminorm.absorbent_closedBall_zero
/-- Seminorm-balls containing the origin are absorbent. -/
protected theorem absorbent_ball (hpr : p x < r) : Absorbent π (ball p x r) := by
refine' (p.absorbent_ball_zero <| sub_pos.2 hpr).subset fun y hy => _
| rw [p.mem_ball_zero] at hy | /-- Seminorm-balls containing the origin are absorbent. -/
protected theorem absorbent_ball (hpr : p x < r) : Absorbent π (ball p x r) := by
refine' (p.absorbent_ball_zero <| sub_pos.2 hpr).subset fun y hy => _
| Mathlib.Analysis.Seminorm.1060_0.ywwMCgoKeIFKDZ3 | /-- Seminorm-balls containing the origin are absorbent. -/
protected theorem absorbent_ball (hpr : p x < r) : Absorbent π (ball p x r) | Mathlib_Analysis_Seminorm |
R : Type u_1
R' : Type u_2
π : Type u_3
πβ : Type u_4
πβ : Type u_5
π : Type u_6
E : Type u_7
Eβ : Type u_8
Eβ : Type u_9
F : Type u_10
G : Type u_11
ΞΉ : Type u_12
instβΒ² : NormedField π
instβΒΉ : AddCommGroup E
instβ : Module π E
p : Seminorm π E
A B : Set E
a : π
r : β
x : E
hpr : p x < r
y : E
hy : p y < r - p x
β’ y β ball p x r | /-
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 Mathlib.Data.Real.Pointwise
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c"
/-!
# 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 a module over a normed ring:
* `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and
subadditive.
* `normSeminorm π E`: The norm on `E` as a seminorm.
## References
* [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966]
## Tags
seminorm, locally convex, LCTVS
-/
set_option autoImplicit true
open NormedField Set Filter
open scoped BigOperators NNReal Pointwise Topology Uniformity
variable {R R' π πβ πβ π E Eβ Eβ F G ΞΉ : Type*}
/-- 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*) [SeminormedRing π] [AddGroup E] [SMul π E] extends
AddGroupSeminorm E where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
smul' : β (a : π) (x : E), toFun (a β’ x) = βaβ * toFun x
#align seminorm Seminorm
attribute [nolint docBlame] Seminorm.toAddGroupSeminorm
/-- `SeminormClass F π E` states that `F` is a type of seminorms on the `π`-module `E`.
You should extend this class when you extend `Seminorm`. -/
class SeminormClass (F : Type*) (π E : outParam <| Type*) [SeminormedRing π] [AddGroup E]
[SMul π E] extends AddGroupSeminormClass F E β where
/-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
and the original seminorm. -/
map_smul_eq_mul (f : F) (a : π) (x : E) : f (a β’ x) = βaβ * f x
#align seminorm_class SeminormClass
export SeminormClass (map_smul_eq_mul)
-- Porting note: dangerous instances no longer exist
-- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass
section Of
/-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a
`SeminormedRing π`. -/
def Seminorm.of [SeminormedRing π] [AddCommGroup 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 where
toFun := f
map_zero' := by rw [β zero_smul π (0 : E), smul, norm_zero, zero_mul]
add_le' := add_le
smul' := smul
neg' x := by rw [β neg_one_smul π, smul, norm_neg, β smul, one_smul]
#align seminorm.of Seminorm.of
/-- Alternative constructor for a `Seminorm` over a normed field `π` that only assumes `f 0 = 0`
and an inequality for the scalar multiplication. -/
def Seminorm.ofSMulLE [NormedField π] [AddCommGroup E] [Module π E] (f : E β β) (map_zero : f 0 = 0)
(add_le : β x y, f (x + y) β€ f x + f y) (smul_le : β (r : π) (x), f (r β’ x) β€ βrβ * f x) :
Seminorm π E :=
Seminorm.of f add_le fun r x => by
refine' le_antisymm (smul_le r x) _
by_cases h : r = 0
Β· simp [h, map_zero]
rw [β mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))]
rw [inv_mul_cancel_leftβ (norm_ne_zero_iff.mpr h)]
specialize smul_le rβ»ΒΉ (r β’ x)
rw [norm_inv] at smul_le
convert smul_le
simp [h]
#align seminorm.of_smul_le Seminorm.ofSMulLE
end Of
namespace Seminorm
section SeminormedRing
variable [SeminormedRing π]
section AddGroup
variable [AddGroup E]
section SMul
variable [SMul π E]
instance instSeminormClass : SeminormClass (Seminorm π E) π E where
coe f := f.toFun
coe_injective' f g h := by
rcases f with β¨β¨_β©β©
rcases g with β¨β¨_β©β©
congr
map_zero f := f.map_zero'
map_add_le_add f := f.add_le'
map_neg_eq_map f := f.neg'
map_smul_eq_mul f := f.smul'
#align seminorm.seminorm_class Seminorm.instSeminormClass
/-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/
instance instCoeFun : CoeFun (Seminorm π E) fun _ => E β β :=
FunLike.hasCoeToFun
@[ext]
theorem ext {p q : Seminorm π E} (h : β x, (p : E β β) x = q x) : p = q :=
FunLike.ext p q h
#align seminorm.ext Seminorm.ext
instance instZero : Zero (Seminorm π E) :=
β¨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with
smul' := fun _ _ => (mul_zero _).symm }β©
@[simp]
theorem coe_zero : β(0 : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_zero Seminorm.coe_zero
@[simp]
theorem zero_apply (x : E) : (0 : Seminorm π E) x = 0 :=
rfl
#align seminorm.zero_apply Seminorm.zero_apply
instance : Inhabited (Seminorm π E) :=
β¨0β©
variable (p : Seminorm π E) (c : π) (x y : E) (r : β)
/-- Any action on `β` which factors through `ββ₯0` applies to a seminorm. -/
instance instSMul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] : SMul R (Seminorm π E) where
smul r p :=
{ r β’ p.toAddGroupSeminorm with
toFun := fun x => r β’ p x
smul' := fun _ _ => by
simp only [β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def, smul_eq_mul]
rw [map_smul_eq_mul, mul_left_comm] }
instance [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] [SMul R' β] [SMul R' ββ₯0]
[IsScalarTower R' ββ₯0 β] [SMul R R'] [IsScalarTower R R' β] :
IsScalarTower R R' (Seminorm π E) where
smul_assoc r a p := ext fun x => smul_assoc r a (p x)
theorem coe_smul [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E) :
β(r β’ p) = r β’ βp :=
rfl
#align seminorm.coe_smul Seminorm.coe_smul
@[simp]
theorem smul_apply [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p : Seminorm π E)
(x : E) : (r β’ p) x = r β’ p x :=
rfl
#align seminorm.smul_apply Seminorm.smul_apply
instance instAdd : Add (Seminorm π E) where
add p q :=
{ p.toAddGroupSeminorm + q.toAddGroupSeminorm with
toFun := fun x => p x + q x
smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] }
theorem coe_add (p q : Seminorm π E) : β(p + q) = p + q :=
rfl
#align seminorm.coe_add Seminorm.coe_add
@[simp]
theorem add_apply (p q : Seminorm π E) (x : E) : (p + q) x = p x + q x :=
rfl
#align seminorm.add_apply Seminorm.add_apply
instance instAddMonoid : AddMonoid (Seminorm π E) :=
FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl
instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π E) :=
FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl
instance instMulAction [Monoid R] [MulAction R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
MulAction R (Seminorm π E) :=
FunLike.coe_injective.mulAction _ (by intros; rfl)
variable (π E)
/-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π E` is a module. -/
@[simps]
def coeFnAddMonoidHom : AddMonoidHom (Seminorm π E) (E β β) where
toFun := (β)
map_zero' := coe_zero
map_add' := coe_add
#align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom
theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π E) :=
show @Function.Injective (Seminorm π E) (E β β) (β) from FunLike.coe_injective
#align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective
variable {π E}
instance instDistribMulAction [Monoid R] [DistribMulAction R β] [SMul R ββ₯0]
[IsScalarTower R ββ₯0 β] : DistribMulAction R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).distribMulAction _ (by intros; rfl)
instance instModule [Semiring R] [Module R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] :
Module R (Seminorm π E) :=
(coeFnAddMonoidHom_injective π E).module R _ (by intros; rfl)
instance instSup : Sup (Seminorm π E) where
sup p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := p β q
smul' := fun x v =>
(congr_argβ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <|
(mul_max_of_nonneg _ _ <| norm_nonneg x).symm }
@[simp]
theorem coe_sup (p q : Seminorm π E) : β(p β q) = (p : E β β) β (q : E β β) :=
rfl
#align seminorm.coe_sup Seminorm.coe_sup
theorem sup_apply (p q : Seminorm π E) (x : E) : (p β q) x = p x β q x :=
rfl
#align seminorm.sup_apply Seminorm.sup_apply
theorem smul_sup [SMul R β] [SMul R ββ₯0] [IsScalarTower 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) := fun 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) : ββ₯0).coe_nonneg
ext fun x => real.smul_max _ _
#align seminorm.smul_sup Seminorm.smul_sup
instance instPartialOrder : PartialOrder (Seminorm π E) :=
PartialOrder.lift _ FunLike.coe_injective
@[simp, norm_cast]
theorem coe_le_coe {p q : Seminorm π E} : (p : E β β) β€ q β p β€ q :=
Iff.rfl
#align seminorm.coe_le_coe Seminorm.coe_le_coe
@[simp, norm_cast]
theorem coe_lt_coe {p q : Seminorm π E} : (p : E β β) < q β p < q :=
Iff.rfl
#align seminorm.coe_lt_coe Seminorm.coe_lt_coe
theorem le_def {p q : Seminorm π E} : p β€ q β β x, p x β€ q x :=
Iff.rfl
#align seminorm.le_def Seminorm.le_def
theorem lt_def {p q : Seminorm π E} : p < q β p β€ q β§ β x, p x < q x :=
@Pi.lt_def _ _ _ p q
#align seminorm.lt_def Seminorm.lt_def
instance instSemilatticeSup : SemilatticeSup (Seminorm π E) :=
Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup
end SMul
end AddGroup
section Module
variable [SeminormedRing πβ] [SeminormedRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : πβ β+* πβ} [RingHomIsometric Οββ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [AddCommGroup Eβ]
variable [AddCommGroup F] [AddCommGroup G]
variable [Module π E] [Module πβ Eβ] [Module πβ Eβ] [Module π F] [Module π G]
-- Porting note: even though this instance is found immediately by typeclass search,
-- it seems to be needed below!?
noncomputable instance smul_nnreal_real : SMul ββ₯0 β := inferInstance
variable [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β]
/-- Composition of a seminorm with a linear map is a seminorm. -/
def comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : Seminorm π E :=
{ p.toAddGroupSeminorm.comp f.toAddMonoidHom with
toFun := fun x => p (f x)
-- Porting note: the `simp only` below used to be part of the `rw`.
-- I'm not sure why this change was needed, and am worried by it!
smul' := fun _ _ => by simp only [map_smulββ]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] }
#align seminorm.comp Seminorm.comp
theorem coe_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) : β(p.comp f) = p β f :=
rfl
#align seminorm.coe_comp Seminorm.coe_comp
@[simp]
theorem comp_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) : (p.comp f) x = p (f x) :=
rfl
#align seminorm.comp_apply Seminorm.comp_apply
@[simp]
theorem comp_id (p : Seminorm π E) : p.comp LinearMap.id = p :=
ext fun _ => rfl
#align seminorm.comp_id Seminorm.comp_id
@[simp]
theorem comp_zero (p : Seminorm πβ Eβ) : p.comp (0 : E βββ[Οββ] Eβ) = 0 :=
ext fun _ => map_zero p
#align seminorm.comp_zero Seminorm.comp_zero
@[simp]
theorem zero_comp (f : E βββ[Οββ] Eβ) : (0 : Seminorm πβ Eβ).comp f = 0 :=
ext fun _ => rfl
#align seminorm.zero_comp Seminorm.zero_comp
theorem comp_comp [RingHomCompTriple Οββ Οββ Οββ] (p : Seminorm πβ Eβ) (g : Eβ βββ[Οββ] Eβ)
(f : E βββ[Οββ] Eβ) : p.comp (g.comp f) = (p.comp g).comp f :=
ext fun _ => rfl
#align seminorm.comp_comp Seminorm.comp_comp
theorem add_comp (p q : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) :
(p + q).comp f = p.comp f + q.comp f :=
ext fun _ => rfl
#align seminorm.add_comp Seminorm.add_comp
theorem comp_add_le (p : Seminorm πβ Eβ) (f g : E βββ[Οββ] Eβ) :
p.comp (f + g) β€ p.comp f + p.comp g := fun _ => map_add_le_add p _ _
#align seminorm.comp_add_le Seminorm.comp_add_le
theorem smul_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : R) :
(c β’ p).comp f = c β’ p.comp f :=
ext fun _ => rfl
#align seminorm.smul_comp Seminorm.smul_comp
theorem comp_mono {p q : Seminorm πβ Eβ} (f : E βββ[Οββ] Eβ) (hp : p β€ q) : p.comp f β€ q.comp f :=
fun _ => hp _
#align seminorm.comp_mono Seminorm.comp_mono
/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E βββ[Οββ] Eβ) : Seminorm πβ Eβ β+ Seminorm π E where
toFun := fun p => p.comp f
map_zero' := zero_comp f
map_add' := fun p q => add_comp p q f
#align seminorm.pullback Seminorm.pullback
instance instOrderBot : OrderBot (Seminorm π E) where
bot := 0
bot_le := map_nonneg
@[simp]
theorem coe_bot : β(β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.coe_bot Seminorm.coe_bot
theorem bot_eq_zero : (β₯ : Seminorm π E) = 0 :=
rfl
#align seminorm.bot_eq_zero Seminorm.bot_eq_zero
theorem smul_le_smul {p q : Seminorm π E} {a b : ββ₯0} (hpq : p β€ q) (hab : a β€ b) :
a β’ p β€ b β’ q := by
simp_rw [le_def]
intro x
exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b)
#align seminorm.smul_le_smul Seminorm.smul_le_smul
theorem finset_sup_apply (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = β(s.sup fun i => β¨p i x, map_nonneg (p i) xβ© : ββ₯0) := by
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]
norm_cast
Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max,
NNReal.coe_max, NNReal.coe_mk, ih]
#align seminorm.finset_sup_apply Seminorm.finset_sup_apply
theorem exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) :
β i β s, s.sup p x = p i x := by
rcases Finset.exists_mem_eq_sup s hs (fun i β¦ (β¨p i x, map_nonneg _ _β© : ββ₯0)) with β¨i, hi, hixβ©
rw [finset_sup_apply]
exact β¨i, hi, congr_arg _ hixβ©
theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) :
s.sup p x = 0 β¨ β i β s, s.sup p x = p i x := by
rcases Finset.eq_empty_or_nonempty s with (rfl|hs)
Β· left; rfl
Β· right; exact exists_apply_eq_finset_sup p hs x
theorem finset_sup_smul (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (C : ββ₯0) :
s.sup (C β’ p) = C β’ s.sup p := by
ext x
rw [smul_apply, finset_sup_apply, finset_sup_apply]
symm
exact congr_arg ((β) : ββ₯0 β β) (NNReal.mul_finset_sup C s (fun i β¦ β¨p i x, map_nonneg _ _β©))
theorem finset_sup_le_sum (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) : s.sup p β€ β i in s, p i := by
classical
refine' Finset.sup_le_iff.mpr _
intro i hi
rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left]
exact bot_le
#align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum
theorem 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 := by
lift a to ββ₯0 using ha
rw [finset_sup_apply, NNReal.coe_le_coe]
exact Finset.sup_le h
#align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le
theorem le_finset_sup_apply {p : ΞΉ β Seminorm π E} {s : Finset ΞΉ} {x : E} {i : ΞΉ}
(hi : i β s) : p i x β€ s.sup p x :=
(Finset.le_sup hi : p i β€ s.sup p) x
theorem 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 := by
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
#align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt
theorem norm_sub_map_le_sub (p : Seminorm π E) (x y : E) : βp x - p yβ β€ p (x - y) :=
abs_sub_map_le_sub p x y
#align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub
end Module
end SeminormedRing
section SeminormedCommRing
variable [SeminormedRing π] [SeminormedCommRing πβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
variable [AddCommGroup E] [AddCommGroup Eβ] [Module π E] [Module πβ Eβ]
theorem comp_smul (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) :
p.comp (c β’ f) = βcββ β’ p.comp f :=
ext fun _ => by
rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm,
smul_eq_mul, comp_apply]
#align seminorm.comp_smul Seminorm.comp_smul
theorem comp_smul_apply (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (c : πβ) (x : E) :
p.comp (c β’ f) x = βcβ * p (f x) :=
map_smul_eq_mul p _ _
#align seminorm.comp_smul_apply Seminorm.comp_smul_apply
end SeminormedCommRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] {p q : Seminorm π E} {x : E}
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) :=
β¨0, by
rintro _ β¨x, rflβ©
dsimp; positivityβ©
#align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add
noncomputable instance instInf : Inf (Seminorm π E) where
inf p q :=
{ p.toAddGroupSeminorm β q.toAddGroupSeminorm with
toFun := fun x => β¨
u : E, p u + q (x - u)
smul' := by
intro a x
obtain rfl | ha := eq_or_ne a 0
Β· rw [norm_zero, zero_mul, zero_smul]
refine'
ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
-- Porting note: the following was previously `fun i => by positivity`
(fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _))
fun x hx => β¨0, by rwa [map_zero, sub_zero, map_zero, add_zero]β©
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, β map_smul_eq_mul p, β
map_smul_eq_mul q, smul_sub]
refine'
Function.Surjective.iInf_congr ((aβ»ΒΉ β’ Β·) : E β E)
(fun u => β¨a β’ u, inv_smul_smulβ ha uβ©) fun u => _
rw [smul_inv_smulβ ha] }
@[simp]
theorem inf_apply (p q : Seminorm π E) (x : E) : (p β q) x = β¨
u : E, p u + q (x - u) :=
rfl
#align seminorm.inf_apply Seminorm.inf_apply
noncomputable instance instLattice : Lattice (Seminorm π E) :=
{ Seminorm.instSemilatticeSup with
inf := (Β· β Β·)
inf_le_left := fun p q x =>
ciInf_le_of_le bddBelow_range_add x <| by
simp only [sub_self, map_zero, add_zero]; rfl
inf_le_right := fun p q x =>
ciInf_le_of_le bddBelow_range_add 0 <| by
simp only [sub_self, map_zero, zero_add, sub_zero]; rfl
le_inf := fun a b c hab hac x =>
le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) }
theorem smul_inf [SMul R β] [SMul R ββ₯0] [IsScalarTower R ββ₯0 β] (r : R) (p q : Seminorm π E) :
r β’ (p β q) = r β’ p β r β’ q := by
ext
simp_rw [smul_apply, inf_apply, smul_apply, β smul_one_smul ββ₯0 r (_ : β), NNReal.smul_def,
smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add]
#align seminorm.smul_inf Seminorm.smul_inf
section Classical
open Classical
/-- We define the supremum of an arbitrary subset of `Seminorm π E` as follows:
* if `s` is `BddAbove` *as a set of functions `E β β`* (that is, if `s` is pointwise bounded
above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a
seminorm.
* otherwise, we take the zero seminorm `β₯`.
There are two things worth mentioning here:
* First, it is not trivial at first that `s` being bounded above *by a function* implies
being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using
that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make
the case disjunction on `BddAbove ((β) '' s : Set (E β β))` and not `BddAbove s`.
* Since the pointwise `Sup` already gives `0` at points where a family of functions is
not bounded above, one could hope that just using the pointwise `Sup` would work here, without the
need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can
give a function which does *not* satisfy the seminorm axioms (typically sub-additivity).
-/
noncomputable instance instSupSet : SupSet (Seminorm π E) where
sSup s :=
if h : BddAbove ((β) '' s : Set (E β β)) then
{ toFun := β¨ p : s, ((p : Seminorm π E) : E β β)
map_zero' := by
rw [iSup_apply, β @Real.ciSup_const_zero s]
congr!
rename_i _ _ _ i
exact map_zero i.1
add_le' := fun x y => by
rcases h with β¨q, hqβ©
obtain rfl | h := s.eq_empty_or_nonempty
Β· simp [Real.ciSup_empty]
haveI : Nonempty βs := h.coe_sort
simp only [iSup_apply]
refine' ciSup_le fun i =>
((i : Seminorm π E).add_le' x y).trans <| add_le_add
-- Porting note: `f` is provided to force `Subtype.val` to appear.
-- A type ascription on `_` would have also worked, but would have been more verbose.
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun x) β¨q x, _β© i)
(le_ciSup (f := fun i => (Subtype.val i : Seminorm π E).toFun y) β¨q y, _β© i)
<;> rw [mem_upperBounds, forall_range_iff]
<;> exact fun j => hq (mem_image_of_mem _ j.2) _
neg' := fun x => by
simp only [iSup_apply]
congr! 2
rename_i _ _ _ i
exact i.1.neg' _
smul' := fun a x => by
simp only [iSup_apply]
rw [β smul_eq_mul,
Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π E) x]
congr!
rename_i _ _ _ i
exact i.1.smul' a x }
else β₯
protected theorem coe_sSup_eq' {s : Set <| Seminorm π E}
(hs : BddAbove ((β) '' s : Set (E β β))) : β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
congr_arg _ (dif_pos hs)
#align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq'
protected theorem bddAbove_iff {s : Set <| Seminorm π E} :
BddAbove s β BddAbove ((β) '' s : Set (E β β)) :=
β¨fun β¨q, hqβ© => β¨q, ball_image_of_ball fun p hp => hq hpβ©, fun H =>
β¨sSup s, fun p hp x => by
dsimp
rw [Seminorm.coe_sSup_eq' H, iSup_apply]
rcases H with β¨q, hqβ©
exact
le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) xβ© β¨p, hpβ©β©β©
#align seminorm.bdd_above_iff Seminorm.bddAbove_iff
protected theorem bddAbove_range_iff {p : ΞΉ β Seminorm π E} :
BddAbove (range p) β β x, BddAbove (range fun i β¦ p i x) := by
rw [Seminorm.bddAbove_iff, β range_comp, bddAbove_range_pi]; rfl
protected theorem coe_sSup_eq {s : Set <| Seminorm π E} (hs : BddAbove s) :
β(sSup s) = β¨ p : s, ((p : Seminorm π E) : E β β) :=
Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs)
#align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) :
β(β¨ i, p i) = β¨ i, ((p i : Seminorm π E) : E β β) := by
rw [β sSup_range, Seminorm.coe_sSup_eq hp]
exact iSup_range' (fun p : Seminorm π E => (p : E β β)) p
#align seminorm.coe_supr_eq Seminorm.coe_iSup_eq
protected theorem sSup_apply {s : Set (Seminorm π E)} (hp : BddAbove s) {x : E} :
(sSup s) x = β¨ p : s, (p : E β β) x := by
rw [Seminorm.coe_sSup_eq hp, iSup_apply]
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β Seminorm π E}
(hp : BddAbove (range p)) {x : E} : (β¨ i, p i) x = β¨ i, p i x := by
rw [Seminorm.coe_iSup_eq hp, iSup_apply]
protected theorem sSup_empty : sSup (β
: Set (Seminorm π E)) = β₯ := by
ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
rfl
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π E)) (hsβ : BddAbove s) (hsβ : s.Nonempty) :
IsLUB s (sSup s) := by
refine' β¨fun p hp x => _, fun p hp x => _β© <;> haveI : Nonempty βs := hsβ.coe_sort <;>
dsimp <;> rw [Seminorm.coe_sSup_eq hsβ, iSup_apply]
Β· rcases hsβ with β¨q, hqβ©
exact le_ciSup β¨q x, forall_range_iff.mpr fun i : s => hq i.2 xβ© β¨p, hpβ©
Β· exact ciSup_le fun q => hp q.2 x
/-- `Seminorm π E` is a conditionally complete lattice.
Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to
the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just
defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you
need to use `sInf` on seminorms, then you should probably provide a more workable definition first,
but this is unlikely to happen so we keep the "bad" definition for now. -/
noncomputable instance instConditionallyCompleteLattice :
ConditionallyCompleteLattice (Seminorm π E) :=
conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π E) Seminorm.isLUB_sSup
end Classical
end NormedField
/-! ### Seminorm ball -/
section SeminormedRing
variable [SeminormedRing π]
section AddCommGroup
variable [AddCommGroup E]
section SMul
variable [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 }
#align seminorm.ball Seminorm.ball
/-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y`
with `p (y - x) β€ r`. -/
def closedBall (x : E) (r : β) :=
{ y : E | p (y - x) β€ r }
#align seminorm.closed_ball Seminorm.closedBall
variable {x y : E} {r : β}
@[simp]
theorem mem_ball : y β ball p x r β p (y - x) < r :=
Iff.rfl
#align seminorm.mem_ball Seminorm.mem_ball
@[simp]
theorem mem_closedBall : y β closedBall p x r β p (y - x) β€ r :=
Iff.rfl
#align seminorm.mem_closed_ball Seminorm.mem_closedBall
theorem mem_ball_self (hr : 0 < r) : x β ball p x r := by simp [hr]
#align seminorm.mem_ball_self Seminorm.mem_ball_self
theorem mem_closedBall_self (hr : 0 β€ r) : x β closedBall p x r := by simp [hr]
#align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self
theorem mem_ball_zero : y β ball p 0 r β p y < r := by rw [mem_ball, sub_zero]
#align seminorm.mem_ball_zero Seminorm.mem_ball_zero
theorem mem_closedBall_zero : y β closedBall p 0 r β p y β€ r := by rw [mem_closedBall, sub_zero]
#align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero
theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } :=
Set.ext fun _ => p.mem_ball_zero
#align seminorm.ball_zero_eq Seminorm.ball_zero_eq
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y β€ r } :=
Set.ext fun _ => p.mem_closedBall_zero
#align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq
theorem ball_subset_closedBall (x r) : ball p x r β closedBall p x r := fun _ h =>
(mem_closedBall _).mpr ((mem_ball _).mp h).le
#align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β Ο > r, ball p x Ο := by
ext y; simp_rw [mem_closedBall, mem_iInterβ, mem_ball, β forall_lt_iff_le']
#align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball
@[simp]
theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
simp [hr]
#align seminorm.ball_zero' Seminorm.ball_zero'
@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π E) x r = Set.univ :=
eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr)
#align seminorm.closed_ball_zero' Seminorm.closedBall_zero'
theorem 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)]
#align seminorm.ball_smul Seminorm.ball_smul
theorem closedBall_smul (p : Seminorm π E) {c : NNReal} (hc : 0 < c) (r : β) (x : E) :
(c β’ p).closedBall x r = p.closedBall x (r / c) := by
ext
rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
le_div_iff (NNReal.coe_pos.mpr hc)]
#align seminorm.closed_ball_smul Seminorm.closedBall_smul
theorem 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.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
#align seminorm.ball_sup Seminorm.ball_sup
theorem closedBall_sup (p : Seminorm π E) (q : Seminorm π E) (e : E) (r : β) :
closedBall (p β q) e r = closedBall p e r β© closedBall q e r := by
simp_rw [closedBall, β Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
#align seminorm.closed_ball_sup Seminorm.closedBall_sup
theorem ball_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : β) :
ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
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]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.ball_finset_sup' Seminorm.ball_finset_sup'
theorem closedBall_finset_sup' (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E)
(r : β) : closedBall (s.sup' H p) e r = s.inf' H fun i => closedBall (p i) e r := by
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, closedBall_sup]
-- Porting note: `rw` can't use `inf_eq_inter` here, but `simp` can?
simp only [inf_eq_inter, ih]
#align seminorm.closed_ball_finset_sup' Seminorm.closedBall_finset_sup'
theorem ball_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) : p.ball x rβ β p.ball x rβ :=
fun _ (hx : _ < _) => hx.trans_le h
#align seminorm.ball_mono Seminorm.ball_mono
theorem closedBall_mono {p : Seminorm π E} {rβ rβ : β} (h : rβ β€ rβ) :
p.closedBall x rβ β p.closedBall x rβ := fun _ (hx : _ β€ _) => hx.trans h
#align seminorm.closed_ball_mono Seminorm.closedBall_mono
theorem ball_antitone {p q : Seminorm π E} (h : q β€ p) : p.ball x r β q.ball x r := fun _ =>
(h _).trans_lt
#align seminorm.ball_antitone Seminorm.ball_antitone
theorem closedBall_antitone {p q : Seminorm π E} (h : q β€ p) :
p.closedBall x r β q.closedBall x r := fun _ => (h _).trans
#align seminorm.closed_ball_antitone Seminorm.closedBall_antitone
theorem 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β) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_ball, add_sub_add_comm]
exact (map_add_le_add p _ _).trans_lt (add_lt_add hyβ hyβ)
#align seminorm.ball_add_ball_subset Seminorm.ball_add_ball_subset
theorem closedBall_add_closedBall_subset (p : Seminorm π E) (rβ rβ : β) (xβ xβ : E) :
p.closedBall (xβ : E) rβ + p.closedBall (xβ : E) rβ β p.closedBall (xβ + xβ) (rβ + rβ) := by
rintro x β¨yβ, yβ, hyβ, hyβ, rflβ©
rw [mem_closedBall, add_sub_add_comm]
exact (map_add_le_add p _ _).trans (add_le_add hyβ hyβ)
#align seminorm.closed_ball_add_closed_ball_subset Seminorm.closedBall_add_closedBall_subset
theorem sub_mem_ball (p : Seminorm π E) (xβ xβ y : E) (r : β) :
xβ - xβ β p.ball y r β xβ β p.ball (xβ + y) r := by simp_rw [mem_ball, sub_sub]
#align seminorm.sub_mem_ball Seminorm.sub_mem_ball
/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm π E) : x +α΅₯ p.ball y r = p.ball (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_ball x y r
#align seminorm.vadd_ball Seminorm.vadd_ball
/-- The image of a closed ball under addition with a singleton is another closed ball. -/
theorem vadd_closedBall (p : Seminorm π E) : x +α΅₯ p.closedBall y r = p.closedBall (x +α΅₯ y) r :=
letI := AddGroupSeminorm.toSeminormedAddCommGroup p.toAddGroupSeminorm
Metric.vadd_closedBall x y r
#align seminorm.vadd_closed_ball Seminorm.vadd_closedBall
end SMul
section Module
variable [Module π E]
variable [SeminormedRing πβ] [AddCommGroup Eβ] [Module πβ Eβ]
variable {Οββ : π β+* πβ} [RingHomIsometric Οββ]
theorem ball_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).ball x r = f β»ΒΉ' p.ball (f x) r := by
ext
simp_rw [ball, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.ball_comp Seminorm.ball_comp
theorem closedBall_comp (p : Seminorm πβ Eβ) (f : E βββ[Οββ] Eβ) (x : E) (r : β) :
(p.comp f).closedBall x r = f β»ΒΉ' p.closedBall (f x) r := by
ext
simp_rw [closedBall, mem_preimage, comp_apply, Set.mem_setOf_eq, map_sub]
#align seminorm.closed_ball_comp Seminorm.closedBall_comp
variable (p : Seminorm π E)
theorem preimage_metric_ball {r : β} : p β»ΒΉ' Metric.ball 0 r = { x | p x < r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_ball_zero_iff, Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_ball Seminorm.preimage_metric_ball
theorem preimage_metric_closedBall {r : β} : p β»ΒΉ' Metric.closedBall 0 r = { x | p x β€ r } := by
ext x
simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
Real.norm_of_nonneg (map_nonneg p _)]
#align seminorm.preimage_metric_closed_ball Seminorm.preimage_metric_closedBall
theorem ball_zero_eq_preimage_ball {r : β} : p.ball 0 r = p β»ΒΉ' Metric.ball 0 r := by
rw [ball_zero_eq, preimage_metric_ball]
#align seminorm.ball_zero_eq_preimage_ball Seminorm.ball_zero_eq_preimage_ball
theorem closedBall_zero_eq_preimage_closedBall {r : β} :
p.closedBall 0 r = p β»ΒΉ' Metric.closedBall 0 r := by
rw [closedBall_zero_eq, preimage_metric_closedBall]
#align seminorm.closed_ball_zero_eq_preimage_closed_ball Seminorm.closedBall_zero_eq_preimage_closedBall
@[simp]
theorem ball_bot {r : β} (x : E) (hr : 0 < r) : ball (β₯ : Seminorm π E) x r = Set.univ :=
ball_zero' x hr
#align seminorm.ball_bot Seminorm.ball_bot
@[simp]
theorem closedBall_bot {r : β} (x : E) (hr : 0 < r) :
closedBall (β₯ : Seminorm π E) x r = Set.univ :=
closedBall_zero' x hr
#align seminorm.closed_ball_bot Seminorm.closedBall_bot
/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : β) : Balanced π (ball p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_ball_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ < r := by rwa [mem_ball_zero] at hy
#align seminorm.balanced_ball_zero Seminorm.balanced_ball_zero
/-- Closed seminorm-balls at the origin are balanced. -/
theorem balanced_closedBall_zero (r : β) : Balanced π (closedBall p 0 r) := by
rintro a ha x β¨y, hy, hxβ©
rw [mem_closedBall_zero, β hx, map_smul_eq_mul]
calc
_ β€ p y := mul_le_of_le_one_left (map_nonneg p _) ha
_ β€ r := by rwa [mem_closedBall_zero] at hy
#align seminorm.balanced_closed_ball_zero Seminorm.balanced_closedBall_zero
theorem ball_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 < r) : ball (s.sup p) x r = β i β s, ball (p i) x r := by
lift r to NNReal using hr.le
simp_rw [ball, iInter_setOf, finset_sup_apply, NNReal.coe_lt_coe,
Finset.sup_lt_iff (show β₯ < r from hr), β NNReal.coe_lt_coe, NNReal.coe_mk]
#align seminorm.ball_finset_sup_eq_Inter Seminorm.ball_finset_sup_eq_iInter
theorem closedBall_finset_sup_eq_iInter (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β}
(hr : 0 β€ r) : closedBall (s.sup p) x r = β i β s, closedBall (p i) x r := by
lift r to NNReal using hr
simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, β
NNReal.coe_le_coe, NNReal.coe_mk]
#align seminorm.closed_ball_finset_sup_eq_Inter Seminorm.closedBall_finset_sup_eq_iInter
theorem ball_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 < r) :
ball (s.sup p) x r = s.inf fun i => ball (p i) x r := by
rw [Finset.inf_eq_iInf]
exact ball_finset_sup_eq_iInter _ _ _ hr
#align seminorm.ball_finset_sup Seminorm.ball_finset_sup
theorem closedBall_finset_sup (p : ΞΉ β Seminorm π E) (s : Finset ΞΉ) (x : E) {r : β} (hr : 0 β€ r) :
closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r := by
rw [Finset.inf_eq_iInf]
exact closedBall_finset_sup_eq_iInter _ _ _ hr
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
@[simp]
theorem ball_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r β€ 0) : p.ball x r = β
:= by
ext
rw [Seminorm.mem_ball, Set.mem_empty_iff_false, iff_false_iff, not_lt]
exact hr.trans (map_nonneg p _)
#align seminorm.ball_eq_emptyset Seminorm.ball_eq_emptyset
@[simp]
theorem closedBall_eq_emptyset (p : Seminorm π E) {x : E} {r : β} (hr : r < 0) :
p.closedBall x r = β
:= by
ext
rw [Seminorm.mem_closedBall, Set.mem_empty_iff_false, iff_false_iff, not_le]
exact hr.trans_le (map_nonneg _ _)
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
theorem closedBall_smul_ball (p : Seminorm π E) {rβ : β} (hrβ : rβ β 0) (rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
refine fun a ha b hb β¦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
exact hrβ.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
theorem ball_smul_closedBall (p : Seminorm π E) (rβ : β) {rβ : β} (hrβ : rβ β 0) :
Metric.ball (0 : π) rβ β’ p.closedBall 0 rβ β p.ball 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
map_smul_eq_mul]
intro a ha b hb
rw [mul_comm, mul_comm rβ]
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ.lt_or_lt.resolve_left ?_)
exact ((map_nonneg p b).trans hb).not_lt
theorem ball_smul_ball (p : Seminorm π E) (rβ rβ : β) :
Metric.ball (0 : π) rβ β’ p.ball 0 rβ β p.ball 0 (rβ * rβ) := by
rcases eq_or_ne rβ 0 with rfl | hrβ
Β· simp
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
(ball_smul_closedBall _ _ hrβ)
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
theorem closedBall_smul_closedBall (p : Seminorm π E) (rβ rβ : β) :
Metric.closedBall (0 : π) rβ β’ p.closedBall 0 rβ β p.closedBall 0 (rβ * rβ) := by
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
intro a ha b hb
gcongr
exact (norm_nonneg _).trans ha
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-- Porting note: TODO: make that an `iff`
theorem neg_mem_ball_zero (r : β) (hx : x β ball p 0 r) : -x β ball p 0 r := by
simpa only [mem_ball_zero, map_neg_eq_map] using hx
#align seminorm.symmetric_ball_zero Seminorm.neg_mem_ball_zero
@[simp]
theorem neg_ball (p : Seminorm π E) (r : β) (x : E) : -ball p x r = ball p (-x) r := by
ext
rw [Set.mem_neg, mem_ball, mem_ball, β neg_add', sub_neg_eq_add, map_neg_eq_map]
#align seminorm.neg_ball Seminorm.neg_ball
end Module
end AddCommGroup
end SeminormedRing
section NormedField
variable [NormedField π] [AddCommGroup E] [Module π E] (p : Seminorm π E) {A B : Set E} {a : π}
{r : β} {x : E}
theorem closedBall_iSup {p : ΞΉ β Seminorm π E} (hp : BddAbove (range p)) (e : E) {r : β}
(hr : 0 < r) : closedBall (β¨ i, p i) e r = β i, closedBall (p i) e r := by
cases isEmpty_or_nonempty ΞΉ
Β· rw [iSup_of_empty', iInter_of_empty, Seminorm.sSup_empty]
exact closedBall_bot _ hr
Β· ext x
have := Seminorm.bddAbove_range_iff.mp hp (x - e)
simp only [mem_closedBall, mem_iInter, Seminorm.iSup_apply hp, ciSup_le_iff this]
theorem ball_norm_mul_subset {p : Seminorm π E} {k : π} {r : β} :
p.ball 0 (βkβ * r) β k β’ p.ball 0 r := by
rcases eq_or_ne k 0 with (rfl | hk)
Β· rw [norm_zero, zero_mul, ball_eq_emptyset _ le_rfl]
exact empty_subset _
Β· intro x
rw [Set.mem_smul_set, Seminorm.mem_ball_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_ball_zero, map_smul_eq_mul, norm_inv, β
mul_lt_mul_left <| norm_pos_iff.mpr hk, β mul_assoc, β div_eq_mul_inv βkβ βkβ,
div_self (ne_of_gt <| norm_pos_iff.mpr hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self hk, one_smul]
#align seminorm.ball_norm_mul_subset Seminorm.ball_norm_mul_subset
theorem smul_ball_zero {p : Seminorm π E} {k : π} {r : β} (hk : k β 0) :
k β’ p.ball 0 r = p.ball 0 (βkβ * r) := by
ext
rw [mem_smul_set_iff_inv_smul_memβ hk, p.mem_ball_zero, p.mem_ball_zero, map_smul_eq_mul,
norm_inv, β div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hk), mul_comm]
#align seminorm.smul_ball_zero Seminorm.smul_ball_zero
theorem smul_closedBall_subset {p : Seminorm π E} {k : π} {r : β} :
k β’ p.closedBall 0 r β p.closedBall 0 (βkβ * r) := by
rintro x β¨y, hy, hβ©
rw [Seminorm.mem_closedBall_zero, β h, map_smul_eq_mul]
rw [Seminorm.mem_closedBall_zero] at hy
gcongr
#align seminorm.smul_closed_ball_subset Seminorm.smul_closedBall_subset
theorem smul_closedBall_zero {p : Seminorm π E} {k : π} {r : β} (hk : 0 < βkβ) :
k β’ p.closedBall 0 r = p.closedBall 0 (βkβ * r) := by
refine' subset_antisymm smul_closedBall_subset _
intro x
rw [Set.mem_smul_set, Seminorm.mem_closedBall_zero]
refine' fun hx => β¨kβ»ΒΉ β’ x, _, _β©
Β· rwa [Seminorm.mem_closedBall_zero, map_smul_eq_mul, norm_inv, β mul_le_mul_left hk, β mul_assoc,
β div_eq_mul_inv βkβ βkβ, div_self (ne_of_gt hk), one_mul]
rw [β smul_assoc, smul_eq_mul, β div_eq_mul_inv, div_self (norm_pos_iff.mp hk), one_smul]
#align seminorm.smul_closed_ball_zero Seminorm.smul_closedBall_zero
theorem ball_zero_absorbs_ball_zero (p : Seminorm π E) {rβ rβ : β} (hrβ : 0 < rβ) :
Absorbs π (p.ball 0 rβ) (p.ball 0 rβ) := by
rcases exists_pos_lt_mul hrβ rβ with β¨r, hrβ, hrβ©
refine' β¨r, hrβ, fun a ha x hx => _β©
rw [smul_ball_zero (norm_pos_iff.1 <| hrβ.trans_le ha), p.mem_ball_zero]
rw [p.mem_ball_zero] at hx
exact hx.trans (hr.trans_le <| by gcongr)
#align seminorm.ball_zero_absorbs_ball_zero Seminorm.ball_zero_absorbs_ball_zero
/-- Seminorm-balls at the origin are absorbent. -/
protected theorem absorbent_ball_zero (hr : 0 < r) : Absorbent π (ball p (0 : E) r) :=
absorbent_iff_forall_absorbs_singleton.2 fun _ =>
(p.ball_zero_absorbs_ball_zero hr).mono_right <|
singleton_subset_iff.2 <| p.mem_ball_zero.2 <| lt_add_one _
#align seminorm.absorbent_ball_zero Seminorm.absorbent_ball_zero
/-- Closed seminorm-balls at the origin are absorbent. -/
protected theorem absorbent_closedBall_zero (hr : 0 < r) : Absorbent π (closedBall p (0 : E) r) :=
(p.absorbent_ball_zero hr).subset (p.ball_subset_closedBall _ _)
#align seminorm.absorbent_closed_ball_zero Seminorm.absorbent_closedBall_zero
/-- Seminorm-balls containing the origin are absorbent. -/
protected theorem absorbent_ball (hpr : p x < r) : Absorbent π (ball p x r) := by
refine' (p.absorbent_ball_zero <| sub_pos.2 hpr).subset fun y hy => _
rw [p.mem_ball_zero] at hy
| exact p.mem_ball.2 ((map_sub_le_add p _ _).trans_lt <| add_lt_of_lt_sub_right hy) | /-- Seminorm-balls containing the origin are absorbent. -/
protected theorem absorbent_ball (hpr : p x < r) : Absorbent π (ball p x r) := by
refine' (p.absorbent_ball_zero <| sub_pos.2 hpr).subset fun y hy => _
rw [p.mem_ball_zero] at hy
| Mathlib.Analysis.Seminorm.1060_0.ywwMCgoKeIFKDZ3 | /-- Seminorm-balls containing the origin are absorbent. -/
protected theorem absorbent_ball (hpr : p x < r) : Absorbent π (ball p x r) | Mathlib_Analysis_Seminorm |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.