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
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 π•œ (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 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by
refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _
/-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by
Mathlib.Analysis.Seminorm.1067_0.ywwMCgoKeIFKDZ3
/-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall 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 ∈ closedBall p 0 (r - p x) ⊒ y ∈ 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 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _
rw [p.mem_closedBall_zero] at hy
/-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _
Mathlib.Analysis.Seminorm.1067_0.ywwMCgoKeIFKDZ3
/-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall 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 ∈ 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 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy
exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy)
/-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy
Mathlib.Analysis.Seminorm.1067_0.ywwMCgoKeIFKDZ3
/-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall 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 y : E r : ℝ a : π•œ ha : a β‰  0 x✝ : E ⊒ x✝ ∈ (fun x => a β€’ x) ⁻¹' ball p y r ↔ x✝ ∈ ball p (a⁻¹ β€’ y) (r / β€–aβ€–)
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by
rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha]
@[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by
Mathlib.Analysis.Seminorm.1074_0.ywwMCgoKeIFKDZ3
@[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–)
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✝³ : NormedSpace ℝ π•œ inst✝² : Module π•œ E inst✝¹ : SMul ℝ E inst✝ : IsScalarTower ℝ π•œ E p : Seminorm π•œ E ⊒ ConvexOn ℝ univ ⇑p
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by
refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩
/-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by
Mathlib.Analysis.Seminorm.1092_0.ywwMCgoKeIFKDZ3
/-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p
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✝³ : NormedSpace ℝ π•œ inst✝² : Module π•œ E inst✝¹ : SMul ℝ E inst✝ : IsScalarTower ℝ π•œ E p : Seminorm π•œ E x : E x✝² : x ∈ univ y : E x✝¹ : y ∈ univ a b : ℝ ha : 0 ≀ a hb : 0 ≀ b x✝ : a + b = 1 ⊒ p (a β€’ x + b β€’ y) ≀ a β€’ p x + b β€’ p y
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩
calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb]
/-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩
Mathlib.Analysis.Seminorm.1092_0.ywwMCgoKeIFKDZ3
/-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p
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✝³ : NormedSpace ℝ π•œ inst✝² : Module π•œ E inst✝¹ : SMul ℝ E inst✝ : IsScalarTower ℝ π•œ E p : Seminorm π•œ E x : E x✝² : x ∈ univ y : E x✝¹ : y ∈ univ a b : ℝ ha : 0 ≀ a hb : 0 ≀ b x✝ : a + b = 1 ⊒ p (a β€’ x) + p (b β€’ y) = β€–a β€’ 1β€– * p x + β€–b β€’ 1β€– * p y
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by
rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul]
/-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by
Mathlib.Analysis.Seminorm.1092_0.ywwMCgoKeIFKDZ3
/-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p
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✝³ : NormedSpace ℝ π•œ inst✝² : Module π•œ E inst✝¹ : SMul ℝ E inst✝ : IsScalarTower ℝ π•œ E p : Seminorm π•œ E x : E x✝² : x ∈ univ y : E x✝¹ : y ∈ univ a b : ℝ ha : 0 ≀ a hb : 0 ≀ b x✝ : a + b = 1 ⊒ β€–a β€’ 1β€– * p x + β€–b β€’ 1β€– * p y = a * p x + b * p y
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by
rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb]
/-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by
Mathlib.Analysis.Seminorm.1092_0.ywwMCgoKeIFKDZ3
/-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p
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✝³ : NormedSpace ℝ π•œ inst✝² : Module π•œ E inst✝¹ : Module ℝ E inst✝ : IsScalarTower ℝ π•œ E p : Seminorm π•œ E x : E r : ℝ ⊒ Convex ℝ (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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by
convert (p.convexOn.translate_left (-x)).convex_lt r
/-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by
Mathlib.Analysis.Seminorm.1110_0.ywwMCgoKeIFKDZ3
/-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r)
Mathlib_Analysis_Seminorm
case h.e'_6 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✝³ : NormedSpace ℝ π•œ inst✝² : Module π•œ E inst✝¹ : Module ℝ E inst✝ : IsScalarTower ℝ π•œ E p : Seminorm π•œ E x : E r : ℝ ⊒ ball p x r = {x_1 | x_1 ∈ (fun z => -x + z) ⁻¹' univ ∧ (⇑p ∘ fun z => z + -x) x_1 < 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r
ext y
/-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r
Mathlib.Analysis.Seminorm.1110_0.ywwMCgoKeIFKDZ3
/-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r)
Mathlib_Analysis_Seminorm
case h.e'_6.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✝³ : NormedSpace ℝ π•œ inst✝² : Module π•œ E inst✝¹ : Module ℝ E inst✝ : IsScalarTower ℝ π•œ E p : Seminorm π•œ E x : E r : ℝ y : E ⊒ y ∈ ball p x r ↔ y ∈ {x_1 | x_1 ∈ (fun z => -x + z) ⁻¹' univ ∧ (⇑p ∘ fun z => z + -x) x_1 < 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y
rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg]
/-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y
Mathlib.Analysis.Seminorm.1110_0.ywwMCgoKeIFKDZ3
/-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r)
Mathlib_Analysis_Seminorm
case h.e'_6.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✝³ : NormedSpace ℝ π•œ inst✝² : Module π•œ E inst✝¹ : Module ℝ E inst✝ : IsScalarTower ℝ π•œ E p : Seminorm π•œ E x : E r : ℝ y : E ⊒ p (y + -x) < r ↔ y ∈ {x_1 | (⇑p ∘ fun z => z + -x) x_1 < 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg]
rfl
/-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg]
Mathlib.Analysis.Seminorm.1110_0.ywwMCgoKeIFKDZ3
/-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (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✝³ : NormedSpace ℝ π•œ inst✝² : Module π•œ E inst✝¹ : Module ℝ E inst✝ : IsScalarTower ℝ π•œ E p : Seminorm π•œ E x : E r : ℝ ⊒ Convex ℝ (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 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by
rw [closedBall_eq_biInter_ball]
/-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by
Mathlib.Analysis.Seminorm.1118_0.ywwMCgoKeIFKDZ3
/-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall 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✝³ : NormedSpace ℝ π•œ inst✝² : Module π•œ E inst✝¹ : Module ℝ E inst✝ : IsScalarTower ℝ π•œ E p : Seminorm π•œ E x : E r : ℝ ⊒ Convex ℝ (β‹‚ ρ, β‹‚ (_ : ρ > r), ball p 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball]
exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _
/-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball]
Mathlib.Analysis.Seminorm.1118_0.ywwMCgoKeIFKDZ3
/-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall 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 π•œ' : Type u_13 inst✝⁷ : NormedField π•œ inst✝⁢ : SeminormedRing π•œ' inst✝⁡ : NormedAlgebra π•œ π•œ' inst✝⁴ : NormOneClass π•œ' inst✝³ : AddCommGroup E inst✝² : Module π•œ' E inst✝¹ : SMul π•œ E inst✝ : IsScalarTower π•œ π•œ' E p : Seminorm π•œ' E a : π•œ x : E ⊒ AddGroupSeminorm.toFun p.toAddGroupSeminorm (a β€’ x) = β€–aβ€– * AddGroupSeminorm.toFun p.toAddGroupSeminorm 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by
rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one]
/-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by
Mathlib.Analysis.Seminorm.1133_0.ywwMCgoKeIFKDZ3
/-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E
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✝⁡ : NontriviallyNormedField π•œ inst✝⁴ : SeminormedRing 𝕝 inst✝³ : AddCommGroup E inst✝² : Module π•œ E inst✝¹ : Module 𝕝 E inst✝ : TopologicalSpace E p : Seminorm 𝕝 E hp : βˆ€ r > 0, closedBall p 0 r ∈ 𝓝 0 ⊒ ContinuousAt (⇑p) 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 Β· 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by
simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp
/-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by
Mathlib.Analysis.Seminorm.1167_0.ywwMCgoKeIFKDZ3
/-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0
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✝⁡ : NontriviallyNormedField π•œ inst✝⁴ : SeminormedRing 𝕝 inst✝³ : AddCommGroup E inst✝² : Module π•œ E inst✝¹ : Module 𝕝 E inst✝ : TopologicalSpace E p : Seminorm 𝕝 E hp : βˆ€ r > 0, ⇑p ⁻¹' Metric.closedBall 0 r ∈ 𝓝 0 ⊒ ContinuousAt (⇑p) 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 Β· 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp
rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero]
/-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp
Mathlib.Analysis.Seminorm.1167_0.ywwMCgoKeIFKDZ3
/-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0
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✝⁢ : NontriviallyNormedField π•œ inst✝⁡ : SeminormedRing 𝕝 inst✝⁴ : AddCommGroup E inst✝³ : Module π•œ E inst✝² : Module 𝕝 E inst✝¹ : TopologicalSpace E inst✝ : ContinuousConstSMul π•œ E p : Seminorm π•œ E r : ℝ hp : closedBall p 0 r ∈ 𝓝 0 ⊒ ContinuousAt (⇑p) 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 Β· 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by
refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_
theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by
Mathlib.Analysis.Seminorm.1176_0.ywwMCgoKeIFKDZ3
theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0
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✝⁢ : NontriviallyNormedField π•œ inst✝⁡ : SeminormedRing 𝕝 inst✝⁴ : AddCommGroup E inst✝³ : Module π•œ E inst✝² : Module 𝕝 E inst✝¹ : TopologicalSpace E inst✝ : ContinuousConstSMul π•œ E p : Seminorm π•œ E r : ℝ hp : closedBall p 0 r ∈ 𝓝 0 Ξ΅ : ℝ hΞ΅ : Ξ΅ > 0 ⊒ closedBall p 0 Ξ΅ ∈ 𝓝 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 Β· 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_
obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr)
theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_
Mathlib.Analysis.Seminorm.1176_0.ywwMCgoKeIFKDZ3
theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0
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✝⁢ : NontriviallyNormedField π•œ inst✝⁡ : SeminormedRing 𝕝 inst✝⁴ : AddCommGroup E inst✝³ : Module π•œ E inst✝² : Module 𝕝 E inst✝¹ : TopologicalSpace E inst✝ : ContinuousConstSMul π•œ E p : Seminorm π•œ E r : ℝ hp : closedBall p 0 r ∈ 𝓝 0 Ξ΅ : ℝ hΞ΅ : Ξ΅ > 0 ⊒ βˆƒ k, 0 < β€–kβ€– ∧ β€–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 _ 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by
rcases le_or_lt r 0 with hr | hr
theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by
Mathlib.Analysis.Seminorm.1176_0.ywwMCgoKeIFKDZ3
theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0
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✝⁢ : NontriviallyNormedField π•œ inst✝⁡ : SeminormedRing 𝕝 inst✝⁴ : AddCommGroup E inst✝³ : Module π•œ E inst✝² : Module 𝕝 E inst✝¹ : TopologicalSpace E inst✝ : ContinuousConstSMul π•œ E p : Seminorm π•œ E r : ℝ hp : closedBall p 0 r ∈ 𝓝 0 Ξ΅ : ℝ hΞ΅ : Ξ΅ > 0 hr : r ≀ 0 ⊒ βˆƒ k, 0 < β€–kβ€– ∧ β€–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 _ 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β·
use 1
theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β·
Mathlib.Analysis.Seminorm.1176_0.ywwMCgoKeIFKDZ3
theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0
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✝⁢ : NontriviallyNormedField π•œ inst✝⁡ : SeminormedRing 𝕝 inst✝⁴ : AddCommGroup E inst✝³ : Module π•œ E inst✝² : Module 𝕝 E inst✝¹ : TopologicalSpace E inst✝ : ContinuousConstSMul π•œ E p : Seminorm π•œ E r : ℝ hp : closedBall p 0 r ∈ 𝓝 0 Ξ΅ : ℝ hΞ΅ : Ξ΅ > 0 hr : r ≀ 0 ⊒ 0 < β€–1β€– ∧ β€–1β€– * 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1;
simpa using hr.trans_lt hΞ΅
theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1;
Mathlib.Analysis.Seminorm.1176_0.ywwMCgoKeIFKDZ3
theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0
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✝⁢ : NontriviallyNormedField π•œ inst✝⁡ : SeminormedRing 𝕝 inst✝⁴ : AddCommGroup E inst✝³ : Module π•œ E inst✝² : Module 𝕝 E inst✝¹ : TopologicalSpace E inst✝ : ContinuousConstSMul π•œ E p : Seminorm π•œ E r : ℝ hp : closedBall p 0 r ∈ 𝓝 0 Ξ΅ : ℝ hΞ΅ : Ξ΅ > 0 hr : 0 < r ⊒ βˆƒ k, 0 < β€–kβ€– ∧ β€–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 _ 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β·
simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr)
theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β·
Mathlib.Analysis.Seminorm.1176_0.ywwMCgoKeIFKDZ3
theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0
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✝⁢ : NontriviallyNormedField π•œ inst✝⁡ : SeminormedRing 𝕝 inst✝⁴ : AddCommGroup E inst✝³ : Module π•œ E inst✝² : Module 𝕝 E inst✝¹ : TopologicalSpace E inst✝ : ContinuousConstSMul π•œ E p : Seminorm π•œ E r : ℝ hp : closedBall p 0 r ∈ 𝓝 0 Ξ΅ : ℝ hΞ΅ : Ξ΅ > 0 k : π•œ hkβ‚€ : 0 < β€–kβ€– hk : β€–kβ€– * r < Ξ΅ ⊒ closedBall p 0 Ξ΅ ∈ 𝓝 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 Β· 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr)
rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp
theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr)
Mathlib.Analysis.Seminorm.1176_0.ywwMCgoKeIFKDZ3
theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0
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✝⁢ : NontriviallyNormedField π•œ inst✝⁡ : SeminormedRing 𝕝 inst✝⁴ : AddCommGroup E inst✝³ : Module π•œ E inst✝² : Module 𝕝 E inst✝¹ : TopologicalSpace E inst✝ : ContinuousConstSMul π•œ E p : Seminorm π•œ E r Ξ΅ : ℝ hΞ΅ : Ξ΅ > 0 k : π•œ hp : closedBall p 0 (β€–kβ€– * r) ∈ 𝓝 0 hkβ‚€ : 0 < β€–kβ€– hk : β€–kβ€– * r < Ξ΅ ⊒ closedBall p 0 Ξ΅ ∈ 𝓝 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 Β· 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp
exact mem_of_superset hp <| p.closedBall_mono hk.le
theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp
Mathlib.Analysis.Seminorm.1176_0.ywwMCgoKeIFKDZ3
theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0
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✝⁢ : NontriviallyNormedField π•œ inst✝⁡ : SeminormedRing 𝕝 inst✝⁴ : AddCommGroup E inst✝³ : Module π•œ E inst✝² : Module 𝕝 E inst✝¹ : UniformSpace E inst✝ : UniformAddGroup E p : Seminorm 𝕝 E hp : ContinuousAt (⇑p) 0 ⊒ UniformContinuous ⇑p
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by
have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp
protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by
Mathlib.Analysis.Seminorm.1201_0.ywwMCgoKeIFKDZ3
protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p
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✝⁢ : NontriviallyNormedField π•œ inst✝⁡ : SeminormedRing 𝕝 inst✝⁴ : AddCommGroup E inst✝³ : Module π•œ E inst✝² : Module 𝕝 E inst✝¹ : UniformSpace E inst✝ : UniformAddGroup E p : Seminorm 𝕝 E hp✝ : ContinuousAt (⇑p) 0 hp : Tendsto (⇑p) (𝓝 0) (𝓝 0) ⊒ UniformContinuous ⇑p
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp
rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff]
protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp
Mathlib.Analysis.Seminorm.1201_0.ywwMCgoKeIFKDZ3
protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p
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✝⁢ : NontriviallyNormedField π•œ inst✝⁡ : SeminormedRing 𝕝 inst✝⁴ : AddCommGroup E inst✝³ : Module π•œ E inst✝² : Module 𝕝 E inst✝¹ : UniformSpace E inst✝ : UniformAddGroup E p : Seminorm 𝕝 E hp✝ : ContinuousAt (⇑p) 0 hp : Tendsto (⇑p) (𝓝 0) (𝓝 0) ⊒ Tendsto ((fun p => dist p.1 p.2) ∘ fun x => (p x.1, p x.2)) (comap (fun x => x.1 - x.2) (𝓝 0)) (𝓝 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 Β· 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff]
exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _
protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff]
Mathlib.Analysis.Seminorm.1201_0.ywwMCgoKeIFKDZ3
protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p
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✝⁢ : NontriviallyNormedField π•œ inst✝⁡ : SeminormedRing 𝕝 inst✝⁴ : AddCommGroup E inst✝³ : Module π•œ E inst✝² : Module 𝕝 E inst✝¹ : TopologicalSpace E inst✝ : TopologicalAddGroup E p : Seminorm 𝕝 E hp : ContinuousAt (⇑p) 0 ⊒ Continuous ⇑p
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by
letI := TopologicalAddGroup.toUniformSpace E
protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by
Mathlib.Analysis.Seminorm.1211_0.ywwMCgoKeIFKDZ3
protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p
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✝⁢ : NontriviallyNormedField π•œ inst✝⁡ : SeminormedRing 𝕝 inst✝⁴ : AddCommGroup E inst✝³ : Module π•œ E inst✝² : Module 𝕝 E inst✝¹ : TopologicalSpace E inst✝ : TopologicalAddGroup E p : Seminorm 𝕝 E hp : ContinuousAt (⇑p) 0 this : UniformSpace E := TopologicalAddGroup.toUniformSpace E ⊒ Continuous ⇑p
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E
haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform
protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E
Mathlib.Analysis.Seminorm.1211_0.ywwMCgoKeIFKDZ3
protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p
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✝⁢ : NontriviallyNormedField π•œ inst✝⁡ : SeminormedRing 𝕝 inst✝⁴ : AddCommGroup E inst✝³ : Module π•œ E inst✝² : Module 𝕝 E inst✝¹ : TopologicalSpace E inst✝ : TopologicalAddGroup E p : Seminorm 𝕝 E hp : ContinuousAt (⇑p) 0 this✝ : UniformSpace E := TopologicalAddGroup.toUniformSpace E this : UniformAddGroup E ⊒ Continuous ⇑p
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform
exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous
protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform
Mathlib.Analysis.Seminorm.1211_0.ywwMCgoKeIFKDZ3
protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p
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✝⁢ : NontriviallyNormedField π•œ inst✝⁡ : SeminormedRing 𝕝 inst✝⁴ : AddCommGroup E inst✝³ : Module π•œ E inst✝² : Module 𝕝 E inst✝¹ : TopologicalSpace E inst✝ : TopologicalAddGroup E p q : Seminorm 𝕝 E hq : Continuous ⇑q hpq : p ≀ q ⊒ Continuous ⇑p
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by
refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq))
theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by
Mathlib.Analysis.Seminorm.1273_0.ywwMCgoKeIFKDZ3
theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p
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✝⁢ : NontriviallyNormedField π•œ inst✝⁡ : SeminormedRing 𝕝 inst✝⁴ : AddCommGroup E inst✝³ : Module π•œ E inst✝² : Module 𝕝 E inst✝¹ : TopologicalSpace E inst✝ : TopologicalAddGroup E p q : Seminorm 𝕝 E hq : Continuous ⇑q hpq : p ≀ q r : ℝ hr : r > 0 ⊒ IsOpen (ball q 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] 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq))
rw [ball_zero_eq]
theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq))
Mathlib.Analysis.Seminorm.1273_0.ywwMCgoKeIFKDZ3
theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p
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✝⁢ : NontriviallyNormedField π•œ inst✝⁡ : SeminormedRing 𝕝 inst✝⁴ : AddCommGroup E inst✝³ : Module π•œ E inst✝² : Module 𝕝 E inst✝¹ : TopologicalSpace E inst✝ : TopologicalAddGroup E p q : Seminorm 𝕝 E hq : Continuous ⇑q hpq : p ≀ q r : ℝ hr : r > 0 ⊒ IsOpen {y | q 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 #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq]
exact isOpen_lt hq continuous_const
theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq]
Mathlib.Analysis.Seminorm.1273_0.ywwMCgoKeIFKDZ3
theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p
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✝⁡ : NontriviallyNormedField π•œ inst✝⁴ : SeminormedRing 𝕝 inst✝³ : AddCommGroup E inst✝² : Module π•œ E inst✝¹ : Module 𝕝 E inst✝ : TopologicalSpace E p : Seminorm 𝕝 E hp : Continuous ⇑p r : ℝ hr : 0 < r this : Tendsto (⇑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 Β· 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by
simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr)
lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by
Mathlib.Analysis.Seminorm.1281_0.ywwMCgoKeIFKDZ3
lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E)
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✝⁷ : NontriviallyNormedField π•œ inst✝⁢ : SeminormedRing 𝕝 inst✝⁡ : AddCommGroup E inst✝⁴ : Module π•œ E inst✝³ : Module 𝕝 E ΞΉ : Sort u_13 inst✝² : UniformSpace E inst✝¹ : UniformAddGroup E inst✝ : ContinuousConstSMul π•œ E p' : ΞΉ β†’ Prop s : ΞΉ β†’ Set E p : Seminorm π•œ E hb : HasBasis (𝓝 0) p' s h₁ : βˆƒ r, closedBall p 0 r ∈ 𝓝 0 hβ‚‚ : βˆ€ (i : ΞΉ), p' i β†’ βˆƒ r > 0, ball p 0 r βŠ† s i ⊒ inst✝² = PseudoMetricSpace.toUniformSpace
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by
refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_
lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by
Mathlib.Analysis.Seminorm.1286_0.ywwMCgoKeIFKDZ3
lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace
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✝⁷ : NontriviallyNormedField π•œ inst✝⁢ : SeminormedRing 𝕝 inst✝⁡ : AddCommGroup E inst✝⁴ : Module π•œ E inst✝³ : Module 𝕝 E ΞΉ : Sort u_13 inst✝² : UniformSpace E inst✝¹ : UniformAddGroup E inst✝ : ContinuousConstSMul π•œ E p' : ΞΉ β†’ Prop s : ΞΉ β†’ Set E p : Seminorm π•œ E hb : HasBasis (𝓝 0) p' s h₁ : βˆƒ r, closedBall p 0 r ∈ 𝓝 0 hβ‚‚ : βˆ€ (i : ΞΉ), p' i β†’ βˆƒ r > 0, ball p 0 r βŠ† s i ⊒ 𝓝 0 = 𝓝 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 Β· 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_
apply le_antisymm
lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_
Mathlib.Analysis.Seminorm.1286_0.ywwMCgoKeIFKDZ3
lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace
Mathlib_Analysis_Seminorm
case a 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✝⁷ : NontriviallyNormedField π•œ inst✝⁢ : SeminormedRing 𝕝 inst✝⁡ : AddCommGroup E inst✝⁴ : Module π•œ E inst✝³ : Module 𝕝 E ΞΉ : Sort u_13 inst✝² : UniformSpace E inst✝¹ : UniformAddGroup E inst✝ : ContinuousConstSMul π•œ E p' : ΞΉ β†’ Prop s : ΞΉ β†’ Set E p : Seminorm π•œ E hb : HasBasis (𝓝 0) p' s h₁ : βˆƒ r, closedBall p 0 r ∈ 𝓝 0 hβ‚‚ : βˆ€ (i : ΞΉ), p' i β†’ βˆƒ r > 0, ball p 0 r βŠ† s i ⊒ 𝓝 0 ≀ 𝓝 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 Β· 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β·
rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap]
lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β·
Mathlib.Analysis.Seminorm.1286_0.ywwMCgoKeIFKDZ3
lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace
Mathlib_Analysis_Seminorm
case a 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✝⁷ : NontriviallyNormedField π•œ inst✝⁢ : SeminormedRing 𝕝 inst✝⁡ : AddCommGroup E inst✝⁴ : Module π•œ E inst✝³ : Module 𝕝 E ΞΉ : Sort u_13 inst✝² : UniformSpace E inst✝¹ : UniformAddGroup E inst✝ : ContinuousConstSMul π•œ E p' : ΞΉ β†’ Prop s : ΞΉ β†’ Set E p : Seminorm π•œ E hb : HasBasis (𝓝 0) p' s h₁ : βˆƒ r, closedBall p 0 r ∈ 𝓝 0 hβ‚‚ : βˆ€ (i : ΞΉ), p' i β†’ βˆƒ r > 0, ball p 0 r βŠ† s i ⊒ Tendsto norm (𝓝 0) (𝓝 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 Β· 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap]
suffices Continuous p from this.tendsto' 0 _ (map_zero p)
lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap]
Mathlib.Analysis.Seminorm.1286_0.ywwMCgoKeIFKDZ3
lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace
Mathlib_Analysis_Seminorm
case a 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✝⁷ : NontriviallyNormedField π•œ inst✝⁢ : SeminormedRing 𝕝 inst✝⁡ : AddCommGroup E inst✝⁴ : Module π•œ E inst✝³ : Module 𝕝 E ΞΉ : Sort u_13 inst✝² : UniformSpace E inst✝¹ : UniformAddGroup E inst✝ : ContinuousConstSMul π•œ E p' : ΞΉ β†’ Prop s : ΞΉ β†’ Set E p : Seminorm π•œ E hb : HasBasis (𝓝 0) p' s h₁ : βˆƒ r, closedBall p 0 r ∈ 𝓝 0 hβ‚‚ : βˆ€ (i : ΞΉ), p' i β†’ βˆƒ r > 0, ball p 0 r βŠ† s i ⊒ Continuous ⇑p
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p)
rcases h₁ with ⟨r, hr⟩
lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p)
Mathlib.Analysis.Seminorm.1286_0.ywwMCgoKeIFKDZ3
lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace
Mathlib_Analysis_Seminorm
case a.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✝⁷ : NontriviallyNormedField π•œ inst✝⁢ : SeminormedRing 𝕝 inst✝⁡ : AddCommGroup E inst✝⁴ : Module π•œ E inst✝³ : Module 𝕝 E ΞΉ : Sort u_13 inst✝² : UniformSpace E inst✝¹ : UniformAddGroup E inst✝ : ContinuousConstSMul π•œ E p' : ΞΉ β†’ Prop s : ΞΉ β†’ Set E p : Seminorm π•œ E hb : HasBasis (𝓝 0) p' s hβ‚‚ : βˆ€ (i : ΞΉ), p' i β†’ βˆƒ r > 0, ball p 0 r βŠ† s i r : ℝ hr : closedBall p 0 r ∈ 𝓝 0 ⊒ Continuous ⇑p
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩
exact p.continuous' hr
lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩
Mathlib.Analysis.Seminorm.1286_0.ywwMCgoKeIFKDZ3
lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace
Mathlib_Analysis_Seminorm
case a 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✝⁷ : NontriviallyNormedField π•œ inst✝⁢ : SeminormedRing 𝕝 inst✝⁡ : AddCommGroup E inst✝⁴ : Module π•œ E inst✝³ : Module 𝕝 E ΞΉ : Sort u_13 inst✝² : UniformSpace E inst✝¹ : UniformAddGroup E inst✝ : ContinuousConstSMul π•œ E p' : ΞΉ β†’ Prop s : ΞΉ β†’ Set E p : Seminorm π•œ E hb : HasBasis (𝓝 0) p' s h₁ : βˆƒ r, closedBall p 0 r ∈ 𝓝 0 hβ‚‚ : βˆ€ (i : ΞΉ), p' i β†’ βˆƒ r > 0, ball p 0 r βŠ† s i ⊒ 𝓝 0 ≀ 𝓝 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 Β· 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β·
rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb]
lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β·
Mathlib.Analysis.Seminorm.1286_0.ywwMCgoKeIFKDZ3
lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace
Mathlib_Analysis_Seminorm
case a 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✝⁷ : NontriviallyNormedField π•œ inst✝⁢ : SeminormedRing 𝕝 inst✝⁡ : AddCommGroup E inst✝⁴ : Module π•œ E inst✝³ : Module 𝕝 E ΞΉ : Sort u_13 inst✝² : UniformSpace E inst✝¹ : UniformAddGroup E inst✝ : ContinuousConstSMul π•œ E p' : ΞΉ β†’ Prop s : ΞΉ β†’ Set E p : Seminorm π•œ E hb : HasBasis (𝓝 0) p' s h₁ : βˆƒ r, closedBall p 0 r ∈ 𝓝 0 hβ‚‚ : βˆ€ (i : ΞΉ), p' i β†’ βˆƒ r > 0, ball p 0 r βŠ† s i ⊒ βˆ€ (i' : ΞΉ), p' i' β†’ βˆƒ i, 0 < i ∧ {y | β€–yβ€– < i} βŠ† s i'
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb]
simpa only [subset_def, mem_ball_zero] using hβ‚‚
lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb]
Mathlib.Analysis.Seminorm.1286_0.ywwMCgoKeIFKDZ3
lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace
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✝⁷ : NontriviallyNormedField π•œ inst✝⁢ : SeminormedRing 𝕝 inst✝⁡ : AddCommGroup E inst✝⁴ : Module π•œ E inst✝³ : Module 𝕝 E ΞΉ : Sort u_13 inst✝² : UniformSpace E inst✝¹ : UniformAddGroup E inst✝ : ContinuousConstSMul π•œ E p' : ΞΉ β†’ Prop s : ΞΉ β†’ Set E p : Seminorm π•œ E hb : HasBasis (𝓝 0) p' s h₁ : βˆƒ r, closedBall p 0 r ∈ 𝓝 0 hβ‚‚ : βˆ€ (i : ΞΉ), p' i β†’ βˆƒ r > 0, ball p 0 r βŠ† s i ⊒ 𝓀 E = β¨… r, β¨… (_ : r > 0), π“Ÿ {x | p (x.1 - x.2) < 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by
rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]
lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by
Mathlib.Analysis.Seminorm.1301_0.ywwMCgoKeIFKDZ3
lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < 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✝⁷ : NontriviallyNormedField π•œ inst✝⁢ : SeminormedRing 𝕝 inst✝⁡ : AddCommGroup E inst✝⁴ : Module π•œ E inst✝³ : Module 𝕝 E ΞΉ : Sort u_13 inst✝² : UniformSpace E inst✝¹ : UniformAddGroup E inst✝ : ContinuousConstSMul π•œ E p' : ΞΉ β†’ Prop s : ΞΉ β†’ Set E p : Seminorm π•œ E hb : HasBasis (𝓝 0) p' s h₁ : βˆƒ r, closedBall p 0 r ∈ 𝓝 0 hβ‚‚ : βˆ€ (i : ΞΉ), p' i β†’ βˆƒ r > 0, ball p 0 r βŠ† s i ⊒ 𝓀 E = β¨… r, β¨… (_ : r > 0), π“Ÿ {x | p (x.1 - x.2) < 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚];
rfl
lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚];
Mathlib.Analysis.Seminorm.1301_0.ywwMCgoKeIFKDZ3
lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < 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 c : π•œ hc : 1 < β€–cβ€– Ξ΅ : ℝ Ξ΅pos : 0 < Ξ΅ x : E hx : p x β‰  0 ⊒ βˆƒ n, c ^ n β‰  0 ∧ p (c ^ n β€’ x) < Ξ΅ ∧ Ξ΅ / β€–cβ€– ≀ p (c ^ n β€’ x) ∧ β€–c ^ n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by
have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by
Mathlib.Analysis.Seminorm.1314_0.ywwMCgoKeIFKDZ3
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x)
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 c : π•œ hc : 1 < β€–cβ€– Ξ΅ : ℝ Ξ΅pos : 0 < Ξ΅ x : E hx : p x β‰  0 ⊒ 0 < p 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by
positivity
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by
Mathlib.Analysis.Seminorm.1314_0.ywwMCgoKeIFKDZ3
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x)
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 c : π•œ hc : 1 < β€–cβ€– Ξ΅ : ℝ Ξ΅pos : 0 < Ξ΅ x : E hx : p x β‰  0 xΞ΅pos : 0 < p x / Ξ΅ ⊒ βˆƒ n, c ^ n β‰  0 ∧ p (c ^ n β€’ x) < Ξ΅ ∧ Ξ΅ / β€–cβ€– ≀ p (c ^ n β€’ x) ∧ β€–c ^ n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity
rcases exists_mem_Ico_zpow xΡpos hc with ⟨n, hn⟩
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity
Mathlib.Analysis.Seminorm.1314_0.ywwMCgoKeIFKDZ3
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x)
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✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p : Seminorm π•œ E c : π•œ hc : 1 < β€–cβ€– Ξ΅ : ℝ Ξ΅pos : 0 < Ξ΅ x : E hx : p x β‰  0 xΞ΅pos : 0 < p x / Ξ΅ n : β„€ hn : p x / Ξ΅ ∈ Ico (β€–cβ€– ^ n) (β€–cβ€– ^ (n + 1)) ⊒ βˆƒ n, c ^ n β‰  0 ∧ p (c ^ n β€’ x) < Ξ΅ ∧ Ξ΅ / β€–cβ€– ≀ p (c ^ n β€’ x) ∧ β€–c ^ n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩
have cpos : 0 < β€–cβ€– := by positivity
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩
Mathlib.Analysis.Seminorm.1314_0.ywwMCgoKeIFKDZ3
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x)
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 c : π•œ hc : 1 < β€–cβ€– Ξ΅ : ℝ Ξ΅pos : 0 < Ξ΅ x : E hx : p x β‰  0 xΞ΅pos : 0 < p x / Ξ΅ n : β„€ hn : p x / Ξ΅ ∈ Ico (β€–cβ€– ^ n) (β€–cβ€– ^ (n + 1)) ⊒ 0 < β€–cβ€–
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by
positivity
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by
Mathlib.Analysis.Seminorm.1314_0.ywwMCgoKeIFKDZ3
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x)
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✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p : Seminorm π•œ E c : π•œ hc : 1 < β€–cβ€– Ξ΅ : ℝ Ξ΅pos : 0 < Ξ΅ x : E hx : p x β‰  0 xΞ΅pos : 0 < p x / Ξ΅ n : β„€ hn : p x / Ξ΅ ∈ Ico (β€–cβ€– ^ n) (β€–cβ€– ^ (n + 1)) cpos : 0 < β€–cβ€– ⊒ βˆƒ n, c ^ n β‰  0 ∧ p (c ^ n β€’ x) < Ξ΅ ∧ Ξ΅ / β€–cβ€– ≀ p (c ^ n β€’ x) ∧ β€–c ^ n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity
have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity
Mathlib.Analysis.Seminorm.1314_0.ywwMCgoKeIFKDZ3
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x)
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 c : π•œ hc : 1 < β€–cβ€– Ξ΅ : ℝ Ξ΅pos : 0 < Ξ΅ x : E hx : p x β‰  0 xΞ΅pos : 0 < p x / Ξ΅ n : β„€ hn : p x / Ξ΅ ∈ Ico (β€–cβ€– ^ n) (β€–cβ€– ^ (n + 1)) cpos : 0 < β€–cβ€– ⊒ 0 < β€–c ^ (n + 1)β€–
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by
rw [norm_zpow]
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by
Mathlib.Analysis.Seminorm.1314_0.ywwMCgoKeIFKDZ3
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x)
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 c : π•œ hc : 1 < β€–cβ€– Ξ΅ : ℝ Ξ΅pos : 0 < Ξ΅ x : E hx : p x β‰  0 xΞ΅pos : 0 < p x / Ξ΅ n : β„€ hn : p x / Ξ΅ ∈ Ico (β€–cβ€– ^ n) (β€–cβ€– ^ (n + 1)) cpos : 0 < β€–cβ€– ⊒ 0 < β€–cβ€– ^ (n + 1)
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow];
exact xΞ΅pos.trans hn.2
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow];
Mathlib.Analysis.Seminorm.1314_0.ywwMCgoKeIFKDZ3
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x)
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✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p : Seminorm π•œ E c : π•œ hc : 1 < β€–cβ€– Ξ΅ : ℝ Ξ΅pos : 0 < Ξ΅ x : E hx : p x β‰  0 xΞ΅pos : 0 < p x / Ξ΅ n : β„€ hn : p x / Ξ΅ ∈ Ico (β€–cβ€– ^ n) (β€–cβ€– ^ (n + 1)) cpos : 0 < β€–cβ€– cnpos : 0 < β€–c ^ (n + 1)β€– ⊒ βˆƒ n, c ^ n β‰  0 ∧ p (c ^ n β€’ x) < Ξ΅ ∧ Ξ΅ / β€–cβ€– ≀ p (c ^ n β€’ x) ∧ β€–c ^ n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2
refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2
Mathlib.Analysis.Seminorm.1314_0.ywwMCgoKeIFKDZ3
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x)
Mathlib_Analysis_Seminorm
case intro.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 c : π•œ hc : 1 < β€–cβ€– Ξ΅ : ℝ Ξ΅pos : 0 < Ξ΅ x : E hx : p x β‰  0 xΞ΅pos : 0 < p x / Ξ΅ n : β„€ hn : p x / Ξ΅ ∈ Ico (β€–cβ€– ^ n) (β€–cβ€– ^ (n + 1)) cpos : 0 < β€–cβ€– cnpos : 0 < β€–c ^ (n + 1)β€– ⊒ c ^ (-(n + 1)) β‰  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 Β· 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β·
show c ^ (-(n + 1)) β‰  0
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β·
Mathlib.Analysis.Seminorm.1314_0.ywwMCgoKeIFKDZ3
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x)
Mathlib_Analysis_Seminorm
case intro.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 c : π•œ hc : 1 < β€–cβ€– Ξ΅ : ℝ Ξ΅pos : 0 < Ξ΅ x : E hx : p x β‰  0 xΞ΅pos : 0 < p x / Ξ΅ n : β„€ hn : p x / Ξ΅ ∈ Ico (β€–cβ€– ^ n) (β€–cβ€– ^ (n + 1)) cpos : 0 < β€–cβ€– cnpos : 0 < β€–c ^ (n + 1)β€– ⊒ c ^ (-(n + 1)) β‰  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 Β· 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0;
exact zpow_ne_zero _ (norm_pos_iff.1 cpos)
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0;
Mathlib.Analysis.Seminorm.1314_0.ywwMCgoKeIFKDZ3
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x)
Mathlib_Analysis_Seminorm
case intro.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 c : π•œ hc : 1 < β€–cβ€– Ξ΅ : ℝ Ξ΅pos : 0 < Ξ΅ x : E hx : p x β‰  0 xΞ΅pos : 0 < p x / Ξ΅ n : β„€ hn : p x / Ξ΅ ∈ Ico (β€–cβ€– ^ n) (β€–cβ€– ^ (n + 1)) cpos : 0 < β€–cβ€– cnpos : 0 < β€–c ^ (n + 1)β€– ⊒ p (c ^ (-(n + 1)) β€’ 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β·
show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β·
Mathlib.Analysis.Seminorm.1314_0.ywwMCgoKeIFKDZ3
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x)
Mathlib_Analysis_Seminorm
case intro.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 c : π•œ hc : 1 < β€–cβ€– Ξ΅ : ℝ Ξ΅pos : 0 < Ξ΅ x : E hx : p x β‰  0 xΞ΅pos : 0 < p x / Ξ΅ n : β„€ hn : p x / Ξ΅ ∈ Ico (β€–cβ€– ^ n) (β€–cβ€– ^ (n + 1)) cpos : 0 < β€–cβ€– cnpos : 0 < β€–c ^ (n + 1)β€– ⊒ p (c ^ (-(n + 1)) β€’ 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅
rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow]
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅
Mathlib.Analysis.Seminorm.1314_0.ywwMCgoKeIFKDZ3
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x)
Mathlib_Analysis_Seminorm
case intro.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 c : π•œ hc : 1 < β€–cβ€– Ξ΅ : ℝ Ξ΅pos : 0 < Ξ΅ x : E hx : p x β‰  0 xΞ΅pos : 0 < p x / Ξ΅ n : β„€ hn : p x / Ξ΅ ∈ Ico (β€–cβ€– ^ n) (β€–cβ€– ^ (n + 1)) cpos : 0 < β€–cβ€– cnpos : 0 < β€–c ^ (n + 1)β€– ⊒ p x < β€–cβ€– ^ (n + 1) * Ξ΅
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow]
exact (div_lt_iff Ξ΅pos).1 (hn.2)
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow]
Mathlib.Analysis.Seminorm.1314_0.ywwMCgoKeIFKDZ3
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x)
Mathlib_Analysis_Seminorm
case intro.refine_3 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 c : π•œ hc : 1 < β€–cβ€– Ξ΅ : ℝ Ξ΅pos : 0 < Ξ΅ x : E hx : p x β‰  0 xΞ΅pos : 0 < p x / Ξ΅ n : β„€ hn : p x / Ξ΅ ∈ Ico (β€–cβ€– ^ n) (β€–cβ€– ^ (n + 1)) cpos : 0 < β€–cβ€– cnpos : 0 < β€–c ^ (n + 1)β€– ⊒ Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β·
show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x)
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β·
Mathlib.Analysis.Seminorm.1314_0.ywwMCgoKeIFKDZ3
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x)
Mathlib_Analysis_Seminorm
case intro.refine_3 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 c : π•œ hc : 1 < β€–cβ€– Ξ΅ : ℝ Ξ΅pos : 0 < Ξ΅ x : E hx : p x β‰  0 xΞ΅pos : 0 < p x / Ξ΅ n : β„€ hn : p x / Ξ΅ ∈ Ico (β€–cβ€– ^ n) (β€–cβ€– ^ (n + 1)) cpos : 0 < β€–cβ€– cnpos : 0 < β€–c ^ (n + 1)β€– ⊒ Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x)
rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm]
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x)
Mathlib.Analysis.Seminorm.1314_0.ywwMCgoKeIFKDZ3
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x)
Mathlib_Analysis_Seminorm
case intro.refine_3 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 c : π•œ hc : 1 < β€–cβ€– Ξ΅ : ℝ Ξ΅pos : 0 < Ξ΅ x : E hx : p x β‰  0 xΞ΅pos : 0 < p x / Ξ΅ n : β„€ hn : p x / Ξ΅ ∈ Ico (β€–cβ€– ^ n) (β€–cβ€– ^ (n + 1)) cpos : 0 < β€–cβ€– cnpos : 0 < β€–c ^ (n + 1)β€– ⊒ β€–cβ€– ^ n * Ξ΅ ≀ p 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm]
exact (le_div_iff Ξ΅pos).1 hn.1
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm]
Mathlib.Analysis.Seminorm.1314_0.ywwMCgoKeIFKDZ3
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x)
Mathlib_Analysis_Seminorm
case intro.refine_4 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 c : π•œ hc : 1 < β€–cβ€– Ξ΅ : ℝ Ξ΅pos : 0 < Ξ΅ x : E hx : p x β‰  0 xΞ΅pos : 0 < p x / Ξ΅ n : β„€ hn : p x / Ξ΅ ∈ Ico (β€–cβ€– ^ n) (β€–cβ€– ^ (n + 1)) cpos : 0 < β€–cβ€– cnpos : 0 < β€–c ^ (n + 1)β€– ⊒ β€–c ^ (-(n + 1))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β·
show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β·
Mathlib.Analysis.Seminorm.1314_0.ywwMCgoKeIFKDZ3
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x)
Mathlib_Analysis_Seminorm
case intro.refine_4 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 c : π•œ hc : 1 < β€–cβ€– Ξ΅ : ℝ Ξ΅pos : 0 < Ξ΅ x : E hx : p x β‰  0 xΞ΅pos : 0 < p x / Ξ΅ n : β„€ hn : p x / Ξ΅ ∈ Ico (β€–cβ€– ^ n) (β€–cβ€– ^ (n + 1)) cpos : 0 < β€–cβ€– cnpos : 0 < β€–c ^ (n + 1)β€– ⊒ β€–c ^ (-(n + 1))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x
have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x
Mathlib.Analysis.Seminorm.1314_0.ywwMCgoKeIFKDZ3
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x)
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 c : π•œ hc : 1 < β€–cβ€– Ξ΅ : ℝ Ξ΅pos : 0 < Ξ΅ x : E hx : p x β‰  0 xΞ΅pos : 0 < p x / Ξ΅ n : β„€ hn : p x / Ξ΅ ∈ Ico (β€–cβ€– ^ n) (β€–cβ€– ^ (n + 1)) cpos : 0 < β€–cβ€– cnpos : 0 < β€–c ^ (n + 1)β€– ⊒ Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€–
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by
ring
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by
Mathlib.Analysis.Seminorm.1314_0.ywwMCgoKeIFKDZ3
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x)
Mathlib_Analysis_Seminorm
case intro.refine_4 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 c : π•œ hc : 1 < β€–cβ€– Ξ΅ : ℝ Ξ΅pos : 0 < Ξ΅ x : E hx : p x β‰  0 xΞ΅pos : 0 < p x / Ξ΅ n : β„€ hn : p x / Ξ΅ ∈ Ico (β€–cβ€– ^ n) (β€–cβ€– ^ (n + 1)) cpos : 0 < β€–cβ€– cnpos : 0 < β€–c ^ (n + 1)β€– this : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– ⊒ β€–c ^ (-(n + 1))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring
rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul]
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring
Mathlib.Analysis.Seminorm.1314_0.ywwMCgoKeIFKDZ3
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x)
Mathlib_Analysis_Seminorm
case intro.refine_4 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 c : π•œ hc : 1 < β€–cβ€– Ξ΅ : ℝ Ξ΅pos : 0 < Ξ΅ x : E hx : p x β‰  0 xΞ΅pos : 0 < p x / Ξ΅ n : β„€ hn : p x / Ξ΅ ∈ Ico (β€–cβ€– ^ n) (β€–cβ€– ^ (n + 1)) cpos : 0 < β€–cβ€– cnpos : 0 < β€–c ^ (n + 1)β€– this : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– ⊒ β€–cβ€– ^ n * β€–cβ€– ≀ p x / Ξ΅ * β€–cβ€–
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul]
exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _)
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul]
Mathlib.Analysis.Seminorm.1314_0.ywwMCgoKeIFKDZ3
/-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x)
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 q : Seminorm π•œ E Ξ΅ C : ℝ Ξ΅_pos : 0 < Ξ΅ c : π•œ hc : 1 < β€–cβ€– hf : βˆ€ (x : E), Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x x : E hx : p x β‰  0 ⊒ q x ≀ C * p 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by
rcases p.rescale_to_shell hc Ρ_pos hx with ⟨δ, hδ, δxle, leδx, -⟩
/-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by
Mathlib.Analysis.Seminorm.1351_0.ywwMCgoKeIFKDZ3
/-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x
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✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p q : Seminorm π•œ E Ξ΅ C : ℝ Ξ΅_pos : 0 < Ξ΅ c : π•œ hc : 1 < β€–cβ€– hf : βˆ€ (x : E), Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x x : E hx : p x β‰  0 Ξ΄ : π•œ hΞ΄ : Ξ΄ β‰  0 Ξ΄xle : p (Ξ΄ β€’ x) < Ξ΅ leΞ΄x : Ξ΅ / β€–cβ€– ≀ p (Ξ΄ β€’ x) ⊒ q x ≀ C * p 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩
simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle
/-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩
Mathlib.Analysis.Seminorm.1351_0.ywwMCgoKeIFKDZ3
/-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x
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 s : Finset ΞΉ q : Seminorm π•œ E Ξ΅ : ℝ C : ℝβ‰₯0 Ξ΅_pos : 0 < Ξ΅ c : π•œ hc : 1 < β€–cβ€– hf : βˆ€ (x : E), (βˆ€ i ∈ s, (p i) x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ (p j) x β†’ q x ≀ (C β€’ p j) x x : E hx : βˆƒ j ∈ s, (p j) x β‰  0 ⊒ q x ≀ (C β€’ Finset.sup s p) 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by
rcases hx with ⟨j, hj, hjx⟩
lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by
Mathlib.Analysis.Seminorm.1370_0.ywwMCgoKeIFKDZ3
lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x
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 s : Finset ΞΉ q : Seminorm π•œ E Ξ΅ : ℝ C : ℝβ‰₯0 Ξ΅_pos : 0 < Ξ΅ c : π•œ hc : 1 < β€–cβ€– hf : βˆ€ (x : E), (βˆ€ i ∈ s, (p i) x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ (p j) x β†’ q x ≀ (C β€’ p j) x x : E j : ΞΉ hj : j ∈ s hjx : (p j) x β‰  0 ⊒ q x ≀ (C β€’ Finset.sup s p) 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩
have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj))
lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩
Mathlib.Analysis.Seminorm.1370_0.ywwMCgoKeIFKDZ3
lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x
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 s : Finset ΞΉ q : Seminorm π•œ E Ξ΅ : ℝ C : ℝβ‰₯0 Ξ΅_pos : 0 < Ξ΅ c : π•œ hc : 1 < β€–cβ€– hf : βˆ€ (x : E), (βˆ€ i ∈ s, (p i) x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ (p j) x β†’ q x ≀ (C β€’ p j) x x : E j : ΞΉ hj : j ∈ s hjx : (p j) x β‰  0 this : (Finset.sup s p) x β‰  0 ⊒ q x ≀ (C β€’ Finset.sup s p) 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj))
refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this
lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj))
Mathlib.Analysis.Seminorm.1370_0.ywwMCgoKeIFKDZ3
lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x
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 s : Finset ΞΉ q : Seminorm π•œ E Ξ΅ : ℝ C : ℝβ‰₯0 Ξ΅_pos : 0 < Ξ΅ c : π•œ hc : 1 < β€–cβ€– hf : βˆ€ (x : E), (βˆ€ i ∈ s, (p i) x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ (p j) x β†’ q x ≀ (C β€’ p j) x x : E j : ΞΉ hj : j ∈ s hjx : (p j) x β‰  0 this : (Finset.sup s p) x β‰  0 y : E hle : Ξ΅ / β€–cβ€– ≀ (Finset.sup s p) y hlt : (Finset.sup s p) y < Ξ΅ ⊒ q y ≀ (C β€’ Finset.sup s p) y
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this
rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩
lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this
Mathlib.Analysis.Seminorm.1370_0.ywwMCgoKeIFKDZ3
lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x
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✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p : ΞΉ β†’ Seminorm π•œ E s : Finset ΞΉ q : Seminorm π•œ E Ξ΅ : ℝ C : ℝβ‰₯0 Ξ΅_pos : 0 < Ξ΅ c : π•œ hc : 1 < β€–cβ€– hf : βˆ€ (x : E), (βˆ€ i ∈ s, (p i) x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ (p j) x β†’ q x ≀ (C β€’ p j) x x : E j : ΞΉ hj : j ∈ s hjx : (p j) x β‰  0 this : (Finset.sup s p) x β‰  0 y : E hle : Ξ΅ / β€–cβ€– ≀ (Finset.sup s p) y hlt : (Finset.sup s p) y < Ξ΅ i : ΞΉ hi : i ∈ s hiy : (Finset.sup s p) y = (p i) y ⊒ q y ≀ (C β€’ Finset.sup s p) y
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩
rw [smul_apply, hiy]
lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩
Mathlib.Analysis.Seminorm.1370_0.ywwMCgoKeIFKDZ3
lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x
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✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p : ΞΉ β†’ Seminorm π•œ E s : Finset ΞΉ q : Seminorm π•œ E Ξ΅ : ℝ C : ℝβ‰₯0 Ξ΅_pos : 0 < Ξ΅ c : π•œ hc : 1 < β€–cβ€– hf : βˆ€ (x : E), (βˆ€ i ∈ s, (p i) x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ (p j) x β†’ q x ≀ (C β€’ p j) x x : E j : ΞΉ hj : j ∈ s hjx : (p j) x β‰  0 this : (Finset.sup s p) x β‰  0 y : E hle : Ξ΅ / β€–cβ€– ≀ (Finset.sup s p) y hlt : (Finset.sup s p) y < Ξ΅ i : ΞΉ hi : i ∈ s hiy : (Finset.sup s p) y = (p i) y ⊒ q y ≀ C β€’ (p i) y
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩ rw [smul_apply, hiy]
exact hf y (fun k hk ↦ (le_finset_sup_apply hk).trans_lt hlt) i hi (hiy β–Έ hle)
lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩ rw [smul_apply, hiy]
Mathlib.Analysis.Seminorm.1370_0.ywwMCgoKeIFKDZ3
lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x
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✝² : NontriviallyNormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p : ΞΉ β†’ Seminorm π•œ E s : Set E hs : Absorbent π•œ s h : βˆ€ x ∈ s, BddAbove (range fun i => (p i) x) ⊒ BddAbove (range p)
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩ rw [smul_apply, hiy] exact hf y (fun k hk ↦ (le_finset_sup_apply hk).trans_lt hlt) i hi (hiy β–Έ hle) end ShellLemmas section NontriviallyNormedField variable [NontriviallyNormedField π•œ] [AddCommGroup E] [Module π•œ E] lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by
rw [Seminorm.bddAbove_range_iff]
lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by
Mathlib.Analysis.Seminorm.1389_0.ywwMCgoKeIFKDZ3
lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p)
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✝² : NontriviallyNormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p : ΞΉ β†’ Seminorm π•œ E s : Set E hs : Absorbent π•œ s h : βˆ€ x ∈ s, BddAbove (range fun i => (p i) x) ⊒ βˆ€ (x : E), BddAbove (range fun i => (p i) 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩ rw [smul_apply, hiy] exact hf y (fun k hk ↦ (le_finset_sup_apply hk).trans_lt hlt) i hi (hiy β–Έ hle) end ShellLemmas section NontriviallyNormedField variable [NontriviallyNormedField π•œ] [AddCommGroup E] [Module π•œ E] lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff]
intro x
lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff]
Mathlib.Analysis.Seminorm.1389_0.ywwMCgoKeIFKDZ3
lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p)
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✝² : NontriviallyNormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p : ΞΉ β†’ Seminorm π•œ E s : Set E hs : Absorbent π•œ s h : βˆ€ x ∈ s, BddAbove (range fun i => (p i) x) x : E ⊒ BddAbove (range fun i => (p i) 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩ rw [smul_apply, hiy] exact hf y (fun k hk ↦ (le_finset_sup_apply hk).trans_lt hlt) i hi (hiy β–Έ hle) end ShellLemmas section NontriviallyNormedField variable [NontriviallyNormedField π•œ] [AddCommGroup E] [Module π•œ E] lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x
rcases hs x with ⟨r, hr, hrx⟩
lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x
Mathlib.Analysis.Seminorm.1389_0.ywwMCgoKeIFKDZ3
lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p)
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✝² : NontriviallyNormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p : ΞΉ β†’ Seminorm π•œ E s : Set E hs : Absorbent π•œ s h : βˆ€ x ∈ s, BddAbove (range fun i => (p i) x) x : E r : ℝ hr : 0 < r hrx : βˆ€ (a : π•œ), r ≀ β€–aβ€– β†’ x ∈ a β€’ s ⊒ BddAbove (range fun i => (p i) 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩ rw [smul_apply, hiy] exact hf y (fun k hk ↦ (le_finset_sup_apply hk).trans_lt hlt) i hi (hiy β–Έ hle) end ShellLemmas section NontriviallyNormedField variable [NontriviallyNormedField π•œ] [AddCommGroup E] [Module π•œ E] lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩
rcases exists_lt_norm π•œ r with ⟨k, hk⟩
lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩
Mathlib.Analysis.Seminorm.1389_0.ywwMCgoKeIFKDZ3
lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p)
Mathlib_Analysis_Seminorm
case 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✝² : NontriviallyNormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p : ΞΉ β†’ Seminorm π•œ E s : Set E hs : Absorbent π•œ s h : βˆ€ x ∈ s, BddAbove (range fun i => (p i) x) x : E r : ℝ hr : 0 < r hrx : βˆ€ (a : π•œ), r ≀ β€–aβ€– β†’ x ∈ a β€’ s k : π•œ hk : r < β€–kβ€– ⊒ BddAbove (range fun i => (p i) 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩ rw [smul_apply, hiy] exact hf y (fun k hk ↦ (le_finset_sup_apply hk).trans_lt hlt) i hi (hiy β–Έ hle) end ShellLemmas section NontriviallyNormedField variable [NontriviallyNormedField π•œ] [AddCommGroup E] [Module π•œ E] lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩ rcases exists_lt_norm π•œ r with ⟨k, hk⟩
have hk0 : k β‰  0 := norm_pos_iff.mp (hr.trans hk)
lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩ rcases exists_lt_norm π•œ r with ⟨k, hk⟩
Mathlib.Analysis.Seminorm.1389_0.ywwMCgoKeIFKDZ3
lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p)
Mathlib_Analysis_Seminorm
case 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✝² : NontriviallyNormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p : ΞΉ β†’ Seminorm π•œ E s : Set E hs : Absorbent π•œ s h : βˆ€ x ∈ s, BddAbove (range fun i => (p i) x) x : E r : ℝ hr : 0 < r hrx : βˆ€ (a : π•œ), r ≀ β€–aβ€– β†’ x ∈ a β€’ s k : π•œ hk : r < β€–kβ€– hk0 : k β‰  0 ⊒ BddAbove (range fun i => (p i) 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩ rw [smul_apply, hiy] exact hf y (fun k hk ↦ (le_finset_sup_apply hk).trans_lt hlt) i hi (hiy β–Έ hle) end ShellLemmas section NontriviallyNormedField variable [NontriviallyNormedField π•œ] [AddCommGroup E] [Module π•œ E] lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩ rcases exists_lt_norm π•œ r with ⟨k, hk⟩ have hk0 : k β‰  0 := norm_pos_iff.mp (hr.trans hk)
have : k⁻¹ β€’ x ∈ s := by rw [← mem_smul_set_iff_inv_smul_memβ‚€ hk0] exact hrx k hk.le
lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩ rcases exists_lt_norm π•œ r with ⟨k, hk⟩ have hk0 : k β‰  0 := norm_pos_iff.mp (hr.trans hk)
Mathlib.Analysis.Seminorm.1389_0.ywwMCgoKeIFKDZ3
lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p)
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✝² : NontriviallyNormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p : ΞΉ β†’ Seminorm π•œ E s : Set E hs : Absorbent π•œ s h : βˆ€ x ∈ s, BddAbove (range fun i => (p i) x) x : E r : ℝ hr : 0 < r hrx : βˆ€ (a : π•œ), r ≀ β€–aβ€– β†’ x ∈ a β€’ s k : π•œ hk : r < β€–kβ€– hk0 : k β‰  0 ⊒ k⁻¹ β€’ x ∈ s
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩ rw [smul_apply, hiy] exact hf y (fun k hk ↦ (le_finset_sup_apply hk).trans_lt hlt) i hi (hiy β–Έ hle) end ShellLemmas section NontriviallyNormedField variable [NontriviallyNormedField π•œ] [AddCommGroup E] [Module π•œ E] lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩ rcases exists_lt_norm π•œ r with ⟨k, hk⟩ have hk0 : k β‰  0 := norm_pos_iff.mp (hr.trans hk) have : k⁻¹ β€’ x ∈ s := by
rw [← mem_smul_set_iff_inv_smul_memβ‚€ hk0]
lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩ rcases exists_lt_norm π•œ r with ⟨k, hk⟩ have hk0 : k β‰  0 := norm_pos_iff.mp (hr.trans hk) have : k⁻¹ β€’ x ∈ s := by
Mathlib.Analysis.Seminorm.1389_0.ywwMCgoKeIFKDZ3
lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p)
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✝² : NontriviallyNormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p : ΞΉ β†’ Seminorm π•œ E s : Set E hs : Absorbent π•œ s h : βˆ€ x ∈ s, BddAbove (range fun i => (p i) x) x : E r : ℝ hr : 0 < r hrx : βˆ€ (a : π•œ), r ≀ β€–aβ€– β†’ x ∈ a β€’ s k : π•œ hk : r < β€–kβ€– hk0 : k β‰  0 ⊒ x ∈ k β€’ s
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩ rw [smul_apply, hiy] exact hf y (fun k hk ↦ (le_finset_sup_apply hk).trans_lt hlt) i hi (hiy β–Έ hle) end ShellLemmas section NontriviallyNormedField variable [NontriviallyNormedField π•œ] [AddCommGroup E] [Module π•œ E] lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩ rcases exists_lt_norm π•œ r with ⟨k, hk⟩ have hk0 : k β‰  0 := norm_pos_iff.mp (hr.trans hk) have : k⁻¹ β€’ x ∈ s := by rw [← mem_smul_set_iff_inv_smul_memβ‚€ hk0]
exact hrx k hk.le
lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩ rcases exists_lt_norm π•œ r with ⟨k, hk⟩ have hk0 : k β‰  0 := norm_pos_iff.mp (hr.trans hk) have : k⁻¹ β€’ x ∈ s := by rw [← mem_smul_set_iff_inv_smul_memβ‚€ hk0]
Mathlib.Analysis.Seminorm.1389_0.ywwMCgoKeIFKDZ3
lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p)
Mathlib_Analysis_Seminorm
case 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✝² : NontriviallyNormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p : ΞΉ β†’ Seminorm π•œ E s : Set E hs : Absorbent π•œ s h : βˆ€ x ∈ s, BddAbove (range fun i => (p i) x) x : E r : ℝ hr : 0 < r hrx : βˆ€ (a : π•œ), r ≀ β€–aβ€– β†’ x ∈ a β€’ s k : π•œ hk : r < β€–kβ€– hk0 : k β‰  0 this : k⁻¹ β€’ x ∈ s ⊒ BddAbove (range fun i => (p i) 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩ rw [smul_apply, hiy] exact hf y (fun k hk ↦ (le_finset_sup_apply hk).trans_lt hlt) i hi (hiy β–Έ hle) end ShellLemmas section NontriviallyNormedField variable [NontriviallyNormedField π•œ] [AddCommGroup E] [Module π•œ E] lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩ rcases exists_lt_norm π•œ r with ⟨k, hk⟩ have hk0 : k β‰  0 := norm_pos_iff.mp (hr.trans hk) have : k⁻¹ β€’ x ∈ s := by rw [← mem_smul_set_iff_inv_smul_memβ‚€ hk0] exact hrx k hk.le
rcases h (k⁻¹ β€’ x) this with ⟨M, hM⟩
lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩ rcases exists_lt_norm π•œ r with ⟨k, hk⟩ have hk0 : k β‰  0 := norm_pos_iff.mp (hr.trans hk) have : k⁻¹ β€’ x ∈ s := by rw [← mem_smul_set_iff_inv_smul_memβ‚€ hk0] exact hrx k hk.le
Mathlib.Analysis.Seminorm.1389_0.ywwMCgoKeIFKDZ3
lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p)
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✝² : NontriviallyNormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p : ΞΉ β†’ Seminorm π•œ E s : Set E hs : Absorbent π•œ s h : βˆ€ x ∈ s, BddAbove (range fun i => (p i) x) x : E r : ℝ hr : 0 < r hrx : βˆ€ (a : π•œ), r ≀ β€–aβ€– β†’ x ∈ a β€’ s k : π•œ hk : r < β€–kβ€– hk0 : k β‰  0 this : k⁻¹ β€’ x ∈ s M : ℝ hM : M ∈ upperBounds (range fun i => (p i) (k⁻¹ β€’ x)) ⊒ BddAbove (range fun i => (p i) 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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩ rw [smul_apply, hiy] exact hf y (fun k hk ↦ (le_finset_sup_apply hk).trans_lt hlt) i hi (hiy β–Έ hle) end ShellLemmas section NontriviallyNormedField variable [NontriviallyNormedField π•œ] [AddCommGroup E] [Module π•œ E] lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩ rcases exists_lt_norm π•œ r with ⟨k, hk⟩ have hk0 : k β‰  0 := norm_pos_iff.mp (hr.trans hk) have : k⁻¹ β€’ x ∈ s := by rw [← mem_smul_set_iff_inv_smul_memβ‚€ hk0] exact hrx k hk.le rcases h (k⁻¹ β€’ x) this with ⟨M, hM⟩
refine βŸ¨β€–kβ€– * M, forall_range_iff.mpr fun i ↦ ?_⟩
lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩ rcases exists_lt_norm π•œ r with ⟨k, hk⟩ have hk0 : k β‰  0 := norm_pos_iff.mp (hr.trans hk) have : k⁻¹ β€’ x ∈ s := by rw [← mem_smul_set_iff_inv_smul_memβ‚€ hk0] exact hrx k hk.le rcases h (k⁻¹ β€’ x) this with ⟨M, hM⟩
Mathlib.Analysis.Seminorm.1389_0.ywwMCgoKeIFKDZ3
lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p)
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✝² : NontriviallyNormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p : ΞΉ β†’ Seminorm π•œ E s : Set E hs : Absorbent π•œ s h : βˆ€ x ∈ s, BddAbove (range fun i => (p i) x) x : E r : ℝ hr : 0 < r hrx : βˆ€ (a : π•œ), r ≀ β€–aβ€– β†’ x ∈ a β€’ s k : π•œ hk : r < β€–kβ€– hk0 : k β‰  0 this : k⁻¹ β€’ x ∈ s M : ℝ hM : M ∈ upperBounds (range fun i => (p i) (k⁻¹ β€’ x)) i : ΞΉ ⊒ (p i) x ≀ β€–kβ€– * M
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩ rw [smul_apply, hiy] exact hf y (fun k hk ↦ (le_finset_sup_apply hk).trans_lt hlt) i hi (hiy β–Έ hle) end ShellLemmas section NontriviallyNormedField variable [NontriviallyNormedField π•œ] [AddCommGroup E] [Module π•œ E] lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩ rcases exists_lt_norm π•œ r with ⟨k, hk⟩ have hk0 : k β‰  0 := norm_pos_iff.mp (hr.trans hk) have : k⁻¹ β€’ x ∈ s := by rw [← mem_smul_set_iff_inv_smul_memβ‚€ hk0] exact hrx k hk.le rcases h (k⁻¹ β€’ x) this with ⟨M, hM⟩ refine βŸ¨β€–kβ€– * M, forall_range_iff.mpr fun i ↦ ?_⟩
have := (forall_range_iff.mp hM) i
lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩ rcases exists_lt_norm π•œ r with ⟨k, hk⟩ have hk0 : k β‰  0 := norm_pos_iff.mp (hr.trans hk) have : k⁻¹ β€’ x ∈ s := by rw [← mem_smul_set_iff_inv_smul_memβ‚€ hk0] exact hrx k hk.le rcases h (k⁻¹ β€’ x) this with ⟨M, hM⟩ refine βŸ¨β€–kβ€– * M, forall_range_iff.mpr fun i ↦ ?_⟩
Mathlib.Analysis.Seminorm.1389_0.ywwMCgoKeIFKDZ3
lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p)
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✝² : NontriviallyNormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p : ΞΉ β†’ Seminorm π•œ E s : Set E hs : Absorbent π•œ s h : βˆ€ x ∈ s, BddAbove (range fun i => (p i) x) x : E r : ℝ hr : 0 < r hrx : βˆ€ (a : π•œ), r ≀ β€–aβ€– β†’ x ∈ a β€’ s k : π•œ hk : r < β€–kβ€– hk0 : k β‰  0 this✝ : k⁻¹ β€’ x ∈ s M : ℝ hM : M ∈ upperBounds (range fun i => (p i) (k⁻¹ β€’ x)) i : ΞΉ this : (p i) (k⁻¹ β€’ x) ≀ M ⊒ (p i) x ≀ β€–kβ€– * M
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩ rw [smul_apply, hiy] exact hf y (fun k hk ↦ (le_finset_sup_apply hk).trans_lt hlt) i hi (hiy β–Έ hle) end ShellLemmas section NontriviallyNormedField variable [NontriviallyNormedField π•œ] [AddCommGroup E] [Module π•œ E] lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩ rcases exists_lt_norm π•œ r with ⟨k, hk⟩ have hk0 : k β‰  0 := norm_pos_iff.mp (hr.trans hk) have : k⁻¹ β€’ x ∈ s := by rw [← mem_smul_set_iff_inv_smul_memβ‚€ hk0] exact hrx k hk.le rcases h (k⁻¹ β€’ x) this with ⟨M, hM⟩ refine βŸ¨β€–kβ€– * M, forall_range_iff.mpr fun i ↦ ?_⟩ have := (forall_range_iff.mp hM) i
rwa [map_smul_eq_mul, norm_inv, inv_mul_le_iff (hr.trans hk)] at this
lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩ rcases exists_lt_norm π•œ r with ⟨k, hk⟩ have hk0 : k β‰  0 := norm_pos_iff.mp (hr.trans hk) have : k⁻¹ β€’ x ∈ s := by rw [← mem_smul_set_iff_inv_smul_memβ‚€ hk0] exact hrx k hk.le rcases h (k⁻¹ β€’ x) this with ⟨M, hM⟩ refine βŸ¨β€–kβ€– * M, forall_range_iff.mpr fun i ↦ ?_⟩ have := (forall_range_iff.mp hM) i
Mathlib.Analysis.Seminorm.1389_0.ywwMCgoKeIFKDZ3
lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p)
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✝¹ : SeminormedAddCommGroup E inst✝ : NormedSpace π•œ E r : ℝ ⊒ Seminorm.ball (normSeminorm π•œ E) = Metric.ball
/- 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩ rw [smul_apply, hiy] exact hf y (fun k hk ↦ (le_finset_sup_apply hk).trans_lt hlt) i hi (hiy β–Έ hle) end ShellLemmas section NontriviallyNormedField variable [NontriviallyNormedField π•œ] [AddCommGroup E] [Module π•œ E] lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩ rcases exists_lt_norm π•œ r with ⟨k, hk⟩ have hk0 : k β‰  0 := norm_pos_iff.mp (hr.trans hk) have : k⁻¹ β€’ x ∈ s := by rw [← mem_smul_set_iff_inv_smul_memβ‚€ hk0] exact hrx k hk.le rcases h (k⁻¹ β€’ x) this with ⟨M, hM⟩ refine βŸ¨β€–kβ€– * M, forall_range_iff.mpr fun i ↦ ?_⟩ have := (forall_range_iff.mp hM) i rwa [map_smul_eq_mul, norm_inv, inv_mul_le_iff (hr.trans hk)] at this end NontriviallyNormedField end Seminorm /-! ### The norm as a seminorm -/ section normSeminorm variable (π•œ) (E) [NormedField π•œ] [SeminormedAddCommGroup E] [NormedSpace π•œ E] {r : ℝ} /-- The norm of a seminormed group as a seminorm. -/ def normSeminorm : Seminorm π•œ E := { normAddGroupSeminorm E with smul' := norm_smul } #align norm_seminorm normSeminorm @[simp] theorem coe_normSeminorm : ⇑(normSeminorm π•œ E) = norm := rfl #align coe_norm_seminorm coe_normSeminorm @[simp] theorem ball_normSeminorm : (normSeminorm π•œ E).ball = Metric.ball := by
ext x r y
@[simp] theorem ball_normSeminorm : (normSeminorm π•œ E).ball = Metric.ball := by
Mathlib.Analysis.Seminorm.1426_0.ywwMCgoKeIFKDZ3
@[simp] theorem ball_normSeminorm : (normSeminorm π•œ E).ball = Metric.ball
Mathlib_Analysis_Seminorm
case h.h.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✝¹ : SeminormedAddCommGroup E inst✝ : NormedSpace π•œ E r✝ : ℝ x : E r : ℝ y : E ⊒ y ∈ Seminorm.ball (normSeminorm π•œ E) x r ↔ y ∈ Metric.ball 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩ rw [smul_apply, hiy] exact hf y (fun k hk ↦ (le_finset_sup_apply hk).trans_lt hlt) i hi (hiy β–Έ hle) end ShellLemmas section NontriviallyNormedField variable [NontriviallyNormedField π•œ] [AddCommGroup E] [Module π•œ E] lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩ rcases exists_lt_norm π•œ r with ⟨k, hk⟩ have hk0 : k β‰  0 := norm_pos_iff.mp (hr.trans hk) have : k⁻¹ β€’ x ∈ s := by rw [← mem_smul_set_iff_inv_smul_memβ‚€ hk0] exact hrx k hk.le rcases h (k⁻¹ β€’ x) this with ⟨M, hM⟩ refine βŸ¨β€–kβ€– * M, forall_range_iff.mpr fun i ↦ ?_⟩ have := (forall_range_iff.mp hM) i rwa [map_smul_eq_mul, norm_inv, inv_mul_le_iff (hr.trans hk)] at this end NontriviallyNormedField end Seminorm /-! ### The norm as a seminorm -/ section normSeminorm variable (π•œ) (E) [NormedField π•œ] [SeminormedAddCommGroup E] [NormedSpace π•œ E] {r : ℝ} /-- The norm of a seminormed group as a seminorm. -/ def normSeminorm : Seminorm π•œ E := { normAddGroupSeminorm E with smul' := norm_smul } #align norm_seminorm normSeminorm @[simp] theorem coe_normSeminorm : ⇑(normSeminorm π•œ E) = norm := rfl #align coe_norm_seminorm coe_normSeminorm @[simp] theorem ball_normSeminorm : (normSeminorm π•œ E).ball = Metric.ball := by ext x r y
simp only [Seminorm.mem_ball, Metric.mem_ball, coe_normSeminorm, dist_eq_norm]
@[simp] theorem ball_normSeminorm : (normSeminorm π•œ E).ball = Metric.ball := by ext x r y
Mathlib.Analysis.Seminorm.1426_0.ywwMCgoKeIFKDZ3
@[simp] theorem ball_normSeminorm : (normSeminorm π•œ E).ball = Metric.ball
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✝¹ : SeminormedAddCommGroup E inst✝ : NormedSpace π•œ E r : ℝ x : E hr : 0 < r ⊒ Absorbent π•œ (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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩ rw [smul_apply, hiy] exact hf y (fun k hk ↦ (le_finset_sup_apply hk).trans_lt hlt) i hi (hiy β–Έ hle) end ShellLemmas section NontriviallyNormedField variable [NontriviallyNormedField π•œ] [AddCommGroup E] [Module π•œ E] lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩ rcases exists_lt_norm π•œ r with ⟨k, hk⟩ have hk0 : k β‰  0 := norm_pos_iff.mp (hr.trans hk) have : k⁻¹ β€’ x ∈ s := by rw [← mem_smul_set_iff_inv_smul_memβ‚€ hk0] exact hrx k hk.le rcases h (k⁻¹ β€’ x) this with ⟨M, hM⟩ refine βŸ¨β€–kβ€– * M, forall_range_iff.mpr fun i ↦ ?_⟩ have := (forall_range_iff.mp hM) i rwa [map_smul_eq_mul, norm_inv, inv_mul_le_iff (hr.trans hk)] at this end NontriviallyNormedField end Seminorm /-! ### The norm as a seminorm -/ section normSeminorm variable (π•œ) (E) [NormedField π•œ] [SeminormedAddCommGroup E] [NormedSpace π•œ E] {r : ℝ} /-- The norm of a seminormed group as a seminorm. -/ def normSeminorm : Seminorm π•œ E := { normAddGroupSeminorm E with smul' := norm_smul } #align norm_seminorm normSeminorm @[simp] theorem coe_normSeminorm : ⇑(normSeminorm π•œ E) = norm := rfl #align coe_norm_seminorm coe_normSeminorm @[simp] theorem ball_normSeminorm : (normSeminorm π•œ E).ball = Metric.ball := by ext x r y simp only [Seminorm.mem_ball, Metric.mem_ball, coe_normSeminorm, dist_eq_norm] #align ball_norm_seminorm ball_normSeminorm variable {π•œ E} {x : E} /-- Balls at the origin are absorbent. -/ theorem absorbent_ball_zero (hr : 0 < r) : Absorbent π•œ (Metric.ball (0 : E) r) := by
rw [← ball_normSeminorm π•œ]
/-- Balls at the origin are absorbent. -/ theorem absorbent_ball_zero (hr : 0 < r) : Absorbent π•œ (Metric.ball (0 : E) r) := by
Mathlib.Analysis.Seminorm.1434_0.ywwMCgoKeIFKDZ3
/-- Balls at the origin are absorbent. -/ theorem absorbent_ball_zero (hr : 0 < r) : Absorbent π•œ (Metric.ball (0 : 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✝¹ : SeminormedAddCommGroup E inst✝ : NormedSpace π•œ E r : ℝ x : E hr : 0 < r ⊒ Absorbent π•œ (Seminorm.ball (normSeminorm π•œ E) 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] 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩ rw [smul_apply, hiy] exact hf y (fun k hk ↦ (le_finset_sup_apply hk).trans_lt hlt) i hi (hiy β–Έ hle) end ShellLemmas section NontriviallyNormedField variable [NontriviallyNormedField π•œ] [AddCommGroup E] [Module π•œ E] lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩ rcases exists_lt_norm π•œ r with ⟨k, hk⟩ have hk0 : k β‰  0 := norm_pos_iff.mp (hr.trans hk) have : k⁻¹ β€’ x ∈ s := by rw [← mem_smul_set_iff_inv_smul_memβ‚€ hk0] exact hrx k hk.le rcases h (k⁻¹ β€’ x) this with ⟨M, hM⟩ refine βŸ¨β€–kβ€– * M, forall_range_iff.mpr fun i ↦ ?_⟩ have := (forall_range_iff.mp hM) i rwa [map_smul_eq_mul, norm_inv, inv_mul_le_iff (hr.trans hk)] at this end NontriviallyNormedField end Seminorm /-! ### The norm as a seminorm -/ section normSeminorm variable (π•œ) (E) [NormedField π•œ] [SeminormedAddCommGroup E] [NormedSpace π•œ E] {r : ℝ} /-- The norm of a seminormed group as a seminorm. -/ def normSeminorm : Seminorm π•œ E := { normAddGroupSeminorm E with smul' := norm_smul } #align norm_seminorm normSeminorm @[simp] theorem coe_normSeminorm : ⇑(normSeminorm π•œ E) = norm := rfl #align coe_norm_seminorm coe_normSeminorm @[simp] theorem ball_normSeminorm : (normSeminorm π•œ E).ball = Metric.ball := by ext x r y simp only [Seminorm.mem_ball, Metric.mem_ball, coe_normSeminorm, dist_eq_norm] #align ball_norm_seminorm ball_normSeminorm variable {π•œ E} {x : E} /-- Balls at the origin are absorbent. -/ theorem absorbent_ball_zero (hr : 0 < r) : Absorbent π•œ (Metric.ball (0 : E) r) := by rw [← ball_normSeminorm π•œ]
exact (normSeminorm _ _).absorbent_ball_zero hr
/-- Balls at the origin are absorbent. -/ theorem absorbent_ball_zero (hr : 0 < r) : Absorbent π•œ (Metric.ball (0 : E) r) := by rw [← ball_normSeminorm π•œ]
Mathlib.Analysis.Seminorm.1434_0.ywwMCgoKeIFKDZ3
/-- Balls at the origin are absorbent. -/ theorem absorbent_ball_zero (hr : 0 < r) : Absorbent π•œ (Metric.ball (0 : 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✝¹ : SeminormedAddCommGroup E inst✝ : NormedSpace π•œ E r : ℝ x : E hx : β€–xβ€– < r ⊒ Absorbent π•œ (Metric.ball 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩ rw [smul_apply, hiy] exact hf y (fun k hk ↦ (le_finset_sup_apply hk).trans_lt hlt) i hi (hiy β–Έ hle) end ShellLemmas section NontriviallyNormedField variable [NontriviallyNormedField π•œ] [AddCommGroup E] [Module π•œ E] lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩ rcases exists_lt_norm π•œ r with ⟨k, hk⟩ have hk0 : k β‰  0 := norm_pos_iff.mp (hr.trans hk) have : k⁻¹ β€’ x ∈ s := by rw [← mem_smul_set_iff_inv_smul_memβ‚€ hk0] exact hrx k hk.le rcases h (k⁻¹ β€’ x) this with ⟨M, hM⟩ refine βŸ¨β€–kβ€– * M, forall_range_iff.mpr fun i ↦ ?_⟩ have := (forall_range_iff.mp hM) i rwa [map_smul_eq_mul, norm_inv, inv_mul_le_iff (hr.trans hk)] at this end NontriviallyNormedField end Seminorm /-! ### The norm as a seminorm -/ section normSeminorm variable (π•œ) (E) [NormedField π•œ] [SeminormedAddCommGroup E] [NormedSpace π•œ E] {r : ℝ} /-- The norm of a seminormed group as a seminorm. -/ def normSeminorm : Seminorm π•œ E := { normAddGroupSeminorm E with smul' := norm_smul } #align norm_seminorm normSeminorm @[simp] theorem coe_normSeminorm : ⇑(normSeminorm π•œ E) = norm := rfl #align coe_norm_seminorm coe_normSeminorm @[simp] theorem ball_normSeminorm : (normSeminorm π•œ E).ball = Metric.ball := by ext x r y simp only [Seminorm.mem_ball, Metric.mem_ball, coe_normSeminorm, dist_eq_norm] #align ball_norm_seminorm ball_normSeminorm variable {π•œ E} {x : E} /-- Balls at the origin are absorbent. -/ theorem absorbent_ball_zero (hr : 0 < r) : Absorbent π•œ (Metric.ball (0 : E) r) := by rw [← ball_normSeminorm π•œ] exact (normSeminorm _ _).absorbent_ball_zero hr #align absorbent_ball_zero absorbent_ball_zero /-- Balls containing the origin are absorbent. -/ theorem absorbent_ball (hx : β€–xβ€– < r) : Absorbent π•œ (Metric.ball x r) := by
rw [← ball_normSeminorm π•œ]
/-- Balls containing the origin are absorbent. -/ theorem absorbent_ball (hx : β€–xβ€– < r) : Absorbent π•œ (Metric.ball x r) := by
Mathlib.Analysis.Seminorm.1440_0.ywwMCgoKeIFKDZ3
/-- Balls containing the origin are absorbent. -/ theorem absorbent_ball (hx : β€–xβ€– < r) : Absorbent π•œ (Metric.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✝² : NormedField π•œ inst✝¹ : SeminormedAddCommGroup E inst✝ : NormedSpace π•œ E r : ℝ x : E hx : β€–xβ€– < r ⊒ Absorbent π•œ (Seminorm.ball (normSeminorm π•œ E) 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩ rw [smul_apply, hiy] exact hf y (fun k hk ↦ (le_finset_sup_apply hk).trans_lt hlt) i hi (hiy β–Έ hle) end ShellLemmas section NontriviallyNormedField variable [NontriviallyNormedField π•œ] [AddCommGroup E] [Module π•œ E] lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩ rcases exists_lt_norm π•œ r with ⟨k, hk⟩ have hk0 : k β‰  0 := norm_pos_iff.mp (hr.trans hk) have : k⁻¹ β€’ x ∈ s := by rw [← mem_smul_set_iff_inv_smul_memβ‚€ hk0] exact hrx k hk.le rcases h (k⁻¹ β€’ x) this with ⟨M, hM⟩ refine βŸ¨β€–kβ€– * M, forall_range_iff.mpr fun i ↦ ?_⟩ have := (forall_range_iff.mp hM) i rwa [map_smul_eq_mul, norm_inv, inv_mul_le_iff (hr.trans hk)] at this end NontriviallyNormedField end Seminorm /-! ### The norm as a seminorm -/ section normSeminorm variable (π•œ) (E) [NormedField π•œ] [SeminormedAddCommGroup E] [NormedSpace π•œ E] {r : ℝ} /-- The norm of a seminormed group as a seminorm. -/ def normSeminorm : Seminorm π•œ E := { normAddGroupSeminorm E with smul' := norm_smul } #align norm_seminorm normSeminorm @[simp] theorem coe_normSeminorm : ⇑(normSeminorm π•œ E) = norm := rfl #align coe_norm_seminorm coe_normSeminorm @[simp] theorem ball_normSeminorm : (normSeminorm π•œ E).ball = Metric.ball := by ext x r y simp only [Seminorm.mem_ball, Metric.mem_ball, coe_normSeminorm, dist_eq_norm] #align ball_norm_seminorm ball_normSeminorm variable {π•œ E} {x : E} /-- Balls at the origin are absorbent. -/ theorem absorbent_ball_zero (hr : 0 < r) : Absorbent π•œ (Metric.ball (0 : E) r) := by rw [← ball_normSeminorm π•œ] exact (normSeminorm _ _).absorbent_ball_zero hr #align absorbent_ball_zero absorbent_ball_zero /-- Balls containing the origin are absorbent. -/ theorem absorbent_ball (hx : β€–xβ€– < r) : Absorbent π•œ (Metric.ball x r) := by rw [← ball_normSeminorm π•œ]
exact (normSeminorm _ _).absorbent_ball hx
/-- Balls containing the origin are absorbent. -/ theorem absorbent_ball (hx : β€–xβ€– < r) : Absorbent π•œ (Metric.ball x r) := by rw [← ball_normSeminorm π•œ]
Mathlib.Analysis.Seminorm.1440_0.ywwMCgoKeIFKDZ3
/-- Balls containing the origin are absorbent. -/ theorem absorbent_ball (hx : β€–xβ€– < r) : Absorbent π•œ (Metric.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✝² : NormedField π•œ inst✝¹ : SeminormedAddCommGroup E inst✝ : NormedSpace π•œ E r : ℝ x : E ⊒ Balanced π•œ (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] #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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩ rw [smul_apply, hiy] exact hf y (fun k hk ↦ (le_finset_sup_apply hk).trans_lt hlt) i hi (hiy β–Έ hle) end ShellLemmas section NontriviallyNormedField variable [NontriviallyNormedField π•œ] [AddCommGroup E] [Module π•œ E] lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩ rcases exists_lt_norm π•œ r with ⟨k, hk⟩ have hk0 : k β‰  0 := norm_pos_iff.mp (hr.trans hk) have : k⁻¹ β€’ x ∈ s := by rw [← mem_smul_set_iff_inv_smul_memβ‚€ hk0] exact hrx k hk.le rcases h (k⁻¹ β€’ x) this with ⟨M, hM⟩ refine βŸ¨β€–kβ€– * M, forall_range_iff.mpr fun i ↦ ?_⟩ have := (forall_range_iff.mp hM) i rwa [map_smul_eq_mul, norm_inv, inv_mul_le_iff (hr.trans hk)] at this end NontriviallyNormedField end Seminorm /-! ### The norm as a seminorm -/ section normSeminorm variable (π•œ) (E) [NormedField π•œ] [SeminormedAddCommGroup E] [NormedSpace π•œ E] {r : ℝ} /-- The norm of a seminormed group as a seminorm. -/ def normSeminorm : Seminorm π•œ E := { normAddGroupSeminorm E with smul' := norm_smul } #align norm_seminorm normSeminorm @[simp] theorem coe_normSeminorm : ⇑(normSeminorm π•œ E) = norm := rfl #align coe_norm_seminorm coe_normSeminorm @[simp] theorem ball_normSeminorm : (normSeminorm π•œ E).ball = Metric.ball := by ext x r y simp only [Seminorm.mem_ball, Metric.mem_ball, coe_normSeminorm, dist_eq_norm] #align ball_norm_seminorm ball_normSeminorm variable {π•œ E} {x : E} /-- Balls at the origin are absorbent. -/ theorem absorbent_ball_zero (hr : 0 < r) : Absorbent π•œ (Metric.ball (0 : E) r) := by rw [← ball_normSeminorm π•œ] exact (normSeminorm _ _).absorbent_ball_zero hr #align absorbent_ball_zero absorbent_ball_zero /-- Balls containing the origin are absorbent. -/ theorem absorbent_ball (hx : β€–xβ€– < r) : Absorbent π•œ (Metric.ball x r) := by rw [← ball_normSeminorm π•œ] exact (normSeminorm _ _).absorbent_ball hx #align absorbent_ball absorbent_ball /-- Balls at the origin are balanced. -/ theorem balanced_ball_zero : Balanced π•œ (Metric.ball (0 : E) r) := by
rw [← ball_normSeminorm π•œ]
/-- Balls at the origin are balanced. -/ theorem balanced_ball_zero : Balanced π•œ (Metric.ball (0 : E) r) := by
Mathlib.Analysis.Seminorm.1446_0.ywwMCgoKeIFKDZ3
/-- Balls at the origin are balanced. -/ theorem balanced_ball_zero : Balanced π•œ (Metric.ball (0 : 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✝¹ : SeminormedAddCommGroup E inst✝ : NormedSpace π•œ E r : ℝ x : E ⊒ Balanced π•œ (Seminorm.ball (normSeminorm π•œ E) 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] 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) #align seminorm.absorbent_ball Seminorm.absorbent_ball /-- Seminorm-balls containing the origin are absorbent. -/ protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent π•œ (closedBall p x r) := by refine' (p.absorbent_closedBall_zero <| sub_pos.2 hpr).subset fun y hy => _ rw [p.mem_closedBall_zero] at hy exact p.mem_closedBall.2 ((map_sub_le_add p _ _).trans <| add_le_of_le_sub_right hy) #align seminorm.absorbent_closed_ball Seminorm.absorbent_closedBall @[simp] theorem smul_ball_preimage (p : Seminorm π•œ E) (y : E) (r : ℝ) (a : π•œ) (ha : a β‰  0) : (a β€’ Β·) ⁻¹' p.ball y r = p.ball (a⁻¹ β€’ y) (r / β€–aβ€–) := Set.ext fun _ => by rw [mem_preimage, mem_ball, mem_ball, lt_div_iff (norm_pos_iff.mpr ha), mul_comm, ← map_smul_eq_mul p, smul_sub, smul_inv_smulβ‚€ ha] #align seminorm.smul_ball_preimage Seminorm.smul_ball_preimage end NormedField section Convex variable [NormedField π•œ] [AddCommGroup E] [NormedSpace ℝ π•œ] [Module π•œ E] section SMul variable [SMul ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) /-- A seminorm is convex. Also see `convexOn_norm`. -/ protected theorem convexOn : ConvexOn ℝ univ p := by refine' ⟨convex_univ, fun x _ y _ a b ha hb _ => _⟩ calc p (a β€’ x + b β€’ y) ≀ p (a β€’ x) + p (b β€’ y) := map_add_le_add p _ _ _ = β€–a β€’ (1 : π•œ)β€– * p x + β€–b β€’ (1 : π•œ)β€– * p y := by rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul] _ = a * p x + b * p y := by rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb] #align seminorm.convex_on Seminorm.convexOn end SMul section Module variable [Module ℝ E] [IsScalarTower ℝ π•œ E] (p : Seminorm π•œ E) (x : E) (r : ℝ) /-- Seminorm-balls are convex. -/ theorem convex_ball : Convex ℝ (ball p x r) := by convert (p.convexOn.translate_left (-x)).convex_lt r ext y rw [preimage_univ, sep_univ, p.mem_ball, sub_eq_add_neg] rfl #align seminorm.convex_ball Seminorm.convex_ball /-- Closed seminorm-balls are convex. -/ theorem convex_closedBall : Convex ℝ (closedBall p x r) := by rw [closedBall_eq_biInter_ball] exact convex_iInterβ‚‚ fun _ _ => convex_ball _ _ _ #align seminorm.convex_closed_ball Seminorm.convex_closedBall end Module end Convex section RestrictScalars variable (π•œ) {π•œ' : Type*} [NormedField π•œ] [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ'] [AddCommGroup E] [Module π•œ' E] [SMul π•œ E] [IsScalarTower π•œ π•œ' E] /-- Reinterpret a seminorm over a field `π•œ'` as a seminorm over a smaller field `π•œ`. This will typically be used with `IsROrC π•œ'` and `π•œ = ℝ`. -/ protected def restrictScalars (p : Seminorm π•œ' E) : Seminorm π•œ E := { p with smul' := fun a x => by rw [← smul_one_smul π•œ' a x, p.smul', norm_smul, norm_one, mul_one] } #align seminorm.restrict_scalars Seminorm.restrictScalars @[simp] theorem coe_restrictScalars (p : Seminorm π•œ' E) : (p.restrictScalars π•œ : E β†’ ℝ) = p := rfl #align seminorm.coe_restrict_scalars Seminorm.coe_restrictScalars @[simp] theorem restrictScalars_ball (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).ball = p.ball := rfl #align seminorm.restrict_scalars_ball Seminorm.restrictScalars_ball @[simp] theorem restrictScalars_closedBall (p : Seminorm π•œ' E) : (p.restrictScalars π•œ).closedBall = p.closedBall := rfl #align seminorm.restrict_scalars_closed_ball Seminorm.restrictScalars_closedBall end RestrictScalars /-! ### Continuity criterions for seminorms -/ section Continuity variable [NontriviallyNormedField π•œ] [SeminormedRing 𝕝] [AddCommGroup E] [Module π•œ E] variable [Module 𝕝 E] /-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by simp_rw [Seminorm.closedBall_zero_eq_preimage_closedBall] at hp rwa [ContinuousAt, Metric.nhds_basis_closedBall.tendsto_right_iff, map_zero] theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := by refine continuousAt_zero_of_forall' fun Ξ΅ hΞ΅ ↦ ?_ obtain ⟨k, hkβ‚€, hk⟩ : βˆƒ k : π•œ, 0 < β€–kβ€– ∧ β€–kβ€– * r < Ξ΅ := by rcases le_or_lt r 0 with hr | hr Β· use 1; simpa using hr.trans_lt hΞ΅ Β· simpa [lt_div_iff hr] using exists_norm_lt π•œ (div_pos hΞ΅ hr) rw [← set_smul_mem_nhds_zero_iff (norm_pos_iff.1 hkβ‚€), smul_closedBall_zero hkβ‚€] at hp exact mem_of_superset hp <| p.closedBall_mono hk.le #align seminorm.continuous_at_zero' Seminorm.continuousAt_zero' /-- A seminorm is continuous at `0` if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuousAt_zero'`. -/ theorem continuousAt_zero_of_forall [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero_of_forall' (fun r hr ↦ Filter.mem_of_superset (hp r hr) <| p.ball_subset_closedBall _ _) theorem continuousAt_zero [TopologicalSpace E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0 := continuousAt_zero' (Filter.mem_of_superset hp <| p.ball_subset_closedBall _ _) #align seminorm.continuous_at_zero Seminorm.continuousAt_zero protected theorem uniformContinuous_of_continuousAt_zero [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : UniformContinuous p := by have hp : Filter.Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp rw [UniformContinuous, uniformity_eq_comap_nhds_zero_swapped, Metric.uniformity_eq_comap_nhds_zero, Filter.tendsto_comap_iff] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds (hp.comp Filter.tendsto_comap) (fun xy => dist_nonneg) fun xy => p.norm_sub_map_le_sub _ _ #align seminorm.uniform_continuous_of_continuous_at_zero Seminorm.uniformContinuous_of_continuousAt_zero protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p := by letI := TopologicalAddGroup.toUniformSpace E haveI : UniformAddGroup E := comm_topologicalAddGroup_is_uniform exact (Seminorm.uniformContinuous_of_continuousAt_zero hp).continuous #align seminorm.continuous_of_continuous_at_zero Seminorm.continuous_of_continuousAt_zero /-- A seminorm is uniformly continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous`. -/ protected theorem uniformContinuous_of_forall [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem uniformContinuous [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.uniform_continuous Seminorm.uniformContinuous /-- A seminorm is uniformly continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.uniformContinuous'`. -/ protected theorem uniformContinuous_of_forall' [UniformSpace E] [UniformAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : UniformContinuous p := Seminorm.uniformContinuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.uniform_continuous' Seminorm.uniformContinuous' /-- A seminorm is continuous if `p.ball 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous`. -/ protected theorem continuous_of_forall [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall hp) protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero hp) #align seminorm.continuous Seminorm.continuous /-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`. Over a `NontriviallyNormedField` it is actually enough to check that this is true for *some* `r`, see `Seminorm.continuous'`. -/ protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E] {p : Seminorm 𝕝 E} (hp : βˆ€ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero_of_forall' hp) protected theorem continuous' [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul π•œ E] {p : Seminorm π•œ E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : Continuous p := Seminorm.continuous_of_continuousAt_zero (continuousAt_zero' hp) #align seminorm.continuous' Seminorm.continuous' theorem continuous_of_le [TopologicalSpace E] [TopologicalAddGroup E] {p q : Seminorm 𝕝 E} (hq : Continuous q) (hpq : p ≀ q) : Continuous p := by refine Seminorm.continuous_of_forall (fun r hr ↦ Filter.mem_of_superset (IsOpen.mem_nhds ?_ <| q.mem_ball_self hr) (ball_antitone hpq)) rw [ball_zero_eq] exact isOpen_lt hq continuous_const #align seminorm.continuous_of_le Seminorm.continuous_of_le lemma ball_mem_nhds [TopologicalSpace E] {p : Seminorm 𝕝 E} (hp : Continuous p) {r : ℝ} (hr : 0 < r) : p.ball 0 r ∈ (𝓝 0 : Filter E) := have this : Tendsto p (𝓝 0) (𝓝 0) := map_zero p β–Έ hp.tendsto 0 by simpa only [p.ball_zero_eq] using this (Iio_mem_nhds hr) lemma uniformSpace_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : β€ΉUniformSpace Eβ€Ί = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace := by refine UniformAddGroup.ext β€Ή_β€Ί p.toAddGroupSeminorm.toSeminormedAddCommGroup.to_uniformAddGroup ?_ apply le_antisymm Β· rw [← @comap_norm_nhds_zero E p.toAddGroupSeminorm.toSeminormedAddGroup, ← tendsto_iff_comap] suffices Continuous p from this.tendsto' 0 _ (map_zero p) rcases h₁ with ⟨r, hr⟩ exact p.continuous' hr Β· rw [(@NormedAddCommGroup.nhds_zero_basis_norm_lt E p.toAddGroupSeminorm.toSeminormedAddGroup).le_basis_iff hb] simpa only [subset_def, mem_ball_zero] using hβ‚‚ lemma uniformity_eq_of_hasBasis {ΞΉ} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul π•œ E] {p' : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set E} (p : Seminorm π•œ E) (hb : (𝓝 0 : Filter E).HasBasis p' s) (h₁ : βˆƒ r, p.closedBall 0 r ∈ 𝓝 0) (hβ‚‚ : βˆ€ i, p' i β†’ βˆƒ r > 0, p.ball 0 r βŠ† s i) : 𝓀 E = β¨… r > 0, π“Ÿ {x | p (x.1 - x.2) < r} := by rw [uniformSpace_eq_of_hasBasis p hb h₁ hβ‚‚]; rfl end Continuity section ShellLemmas variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell_zpow (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒ n : β„€, c^n β‰  0 ∧ p (c^n β€’ x) < Ξ΅ ∧ (Ξ΅ / β€–cβ€– ≀ p (c^n β€’ x)) ∧ (β€–c^n‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := by have xΞ΅pos : 0 < (p x)/Ξ΅ := by positivity rcases exists_mem_Ico_zpow xΞ΅pos hc with ⟨n, hn⟩ have cpos : 0 < β€–cβ€– := by positivity have cnpos : 0 < β€–c^(n+1)β€– := by rw [norm_zpow]; exact xΞ΅pos.trans hn.2 refine ⟨-(n+1), ?_, ?_, ?_, ?_⟩ Β· show c ^ (-(n + 1)) β‰  0; exact zpow_ne_zero _ (norm_pos_iff.1 cpos) Β· show p ((c ^ (-(n + 1))) β€’ x) < Ξ΅ rw [map_smul_eq_mul, zpow_neg, norm_inv, ← div_eq_inv_mul, div_lt_iff cnpos, mul_comm, norm_zpow] exact (div_lt_iff Ξ΅pos).1 (hn.2) Β· show Ξ΅ / β€–cβ€– ≀ p (c ^ (-(n + 1)) β€’ x) rw [zpow_neg, div_le_iff cpos, map_smul_eq_mul, norm_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, mul_inv_rev, mul_comm, ← mul_assoc, ← mul_assoc, mul_inv_cancel (ne_of_gt cpos), one_mul, ← div_eq_inv_mul, le_div_iff (zpow_pos_of_pos cpos _), mul_comm] exact (le_div_iff Ξ΅pos).1 hn.1 Β· show β€–(c ^ (-(n + 1)))‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x have : Ρ⁻¹ * β€–cβ€– * p x = Ρ⁻¹ * p x * β€–cβ€– := by ring rw [zpow_neg, norm_inv, inv_inv, norm_zpow, zpow_addβ‚€ (ne_of_gt cpos), zpow_one, this, ← div_eq_inv_mul] exact mul_le_mul_of_nonneg_right hn.1 (norm_nonneg _) /-- Let `p` be a seminorm on a vector space over a `NormedField`. If there is a scalar `c` with `β€–cβ€–>1`, then any `x` such that `p x β‰  0` can be moved by scalar multiplication to any `p`-shell of width `β€–cβ€–`. Also recap information on the value of `p` on the rescaling element that shows up in applications. -/ lemma rescale_to_shell (p : Seminorm π•œ E) {c : π•œ} (hc : 1 < β€–cβ€–) {Ξ΅ : ℝ} (Ξ΅pos : 0 < Ξ΅) {x : E} (hx : p x β‰  0) : βˆƒd:π•œ, d β‰  0 ∧ p (d β€’ x) < Ξ΅ ∧ (Ξ΅/β€–cβ€– ≀ p (d β€’ x)) ∧ (β€–d‖⁻¹ ≀ Ρ⁻¹ * β€–cβ€– * p x) := let ⟨_, hn⟩ := p.rescale_to_shell_zpow hc Ξ΅pos hx; ⟨_, hn⟩ /-- Let `p` and `q` be two seminorms on a vector space over a `nontrivially_normed_field`. If we have `q x ≀ C * p x` on some shell of the form `{x | Ξ΅/β€–cβ€– ≀ p x < Ξ΅}` (where `Ξ΅ > 0` and `β€–cβ€– > 1`), then we also have `q x ≀ C * p x` for all `x` such that `p x β‰  0`. -/ lemma bound_of_shell (p q : Seminorm π•œ E) {Ξ΅ C : ℝ} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ C * p x) {x : E} (hx : p x β‰  0) : q x ≀ C * p x := by rcases p.rescale_to_shell hc Ξ΅_pos hx with ⟨δ, hΞ΄, Ξ΄xle, leΞ΄x, -⟩ simpa only [map_smul_eq_mul, mul_left_comm C, mul_le_mul_left (norm_pos_iff.2 hΞ΄)] using hf (Ξ΄ β€’ x) leΞ΄x Ξ΄xle /-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of seminorms. -/ lemma bound_of_shell_smul (p q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, Ξ΅ / β€–cβ€– ≀ p x β†’ p x < Ξ΅ β†’ q x ≀ (C β€’ p) x) {x : E} (hx : p x β‰  0) : q x ≀ (C β€’ p) x := Seminorm.bound_of_shell p q Ξ΅_pos hc hf hx lemma bound_of_shell_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (q : Seminorm π•œ E) {Ξ΅ : ℝ} {C : ℝβ‰₯0} (Ξ΅_pos : 0 < Ξ΅) {c : π•œ} (hc : 1 < β€–cβ€–) (hf : βˆ€ x, (βˆ€ i ∈ s, p i x < Ξ΅) β†’ βˆ€ j ∈ s, Ξ΅ / β€–cβ€– ≀ p j x β†’ q x ≀ (C β€’ p j) x) {x : E} (hx : βˆƒ j, j ∈ s ∧ p j x β‰  0) : q x ≀ (C β€’ s.sup p) x := by rcases hx with ⟨j, hj, hjx⟩ have : (s.sup p) x β‰  0 := ne_of_gt ((hjx.symm.lt_of_le $ map_nonneg _ _).trans_le (le_finset_sup_apply hj)) refine (s.sup p).bound_of_shell_smul q Ξ΅_pos hc (fun y hle hlt ↦ ?_) this rcases exists_apply_eq_finset_sup p ⟨j, hj⟩ y with ⟨i, hi, hiy⟩ rw [smul_apply, hiy] exact hf y (fun k hk ↦ (le_finset_sup_apply hk).trans_lt hlt) i hi (hiy β–Έ hle) end ShellLemmas section NontriviallyNormedField variable [NontriviallyNormedField π•œ] [AddCommGroup E] [Module π•œ E] lemma bddAbove_of_absorbent {p : ΞΉ β†’ Seminorm π•œ E} {s : Set E} (hs : Absorbent π•œ s) (h : βˆ€ x ∈ s, BddAbove (range fun i ↦ p i x)) : BddAbove (range p) := by rw [Seminorm.bddAbove_range_iff] intro x rcases hs x with ⟨r, hr, hrx⟩ rcases exists_lt_norm π•œ r with ⟨k, hk⟩ have hk0 : k β‰  0 := norm_pos_iff.mp (hr.trans hk) have : k⁻¹ β€’ x ∈ s := by rw [← mem_smul_set_iff_inv_smul_memβ‚€ hk0] exact hrx k hk.le rcases h (k⁻¹ β€’ x) this with ⟨M, hM⟩ refine βŸ¨β€–kβ€– * M, forall_range_iff.mpr fun i ↦ ?_⟩ have := (forall_range_iff.mp hM) i rwa [map_smul_eq_mul, norm_inv, inv_mul_le_iff (hr.trans hk)] at this end NontriviallyNormedField end Seminorm /-! ### The norm as a seminorm -/ section normSeminorm variable (π•œ) (E) [NormedField π•œ] [SeminormedAddCommGroup E] [NormedSpace π•œ E] {r : ℝ} /-- The norm of a seminormed group as a seminorm. -/ def normSeminorm : Seminorm π•œ E := { normAddGroupSeminorm E with smul' := norm_smul } #align norm_seminorm normSeminorm @[simp] theorem coe_normSeminorm : ⇑(normSeminorm π•œ E) = norm := rfl #align coe_norm_seminorm coe_normSeminorm @[simp] theorem ball_normSeminorm : (normSeminorm π•œ E).ball = Metric.ball := by ext x r y simp only [Seminorm.mem_ball, Metric.mem_ball, coe_normSeminorm, dist_eq_norm] #align ball_norm_seminorm ball_normSeminorm variable {π•œ E} {x : E} /-- Balls at the origin are absorbent. -/ theorem absorbent_ball_zero (hr : 0 < r) : Absorbent π•œ (Metric.ball (0 : E) r) := by rw [← ball_normSeminorm π•œ] exact (normSeminorm _ _).absorbent_ball_zero hr #align absorbent_ball_zero absorbent_ball_zero /-- Balls containing the origin are absorbent. -/ theorem absorbent_ball (hx : β€–xβ€– < r) : Absorbent π•œ (Metric.ball x r) := by rw [← ball_normSeminorm π•œ] exact (normSeminorm _ _).absorbent_ball hx #align absorbent_ball absorbent_ball /-- Balls at the origin are balanced. -/ theorem balanced_ball_zero : Balanced π•œ (Metric.ball (0 : E) r) := by rw [← ball_normSeminorm π•œ]
exact (normSeminorm _ _).balanced_ball_zero r
/-- Balls at the origin are balanced. -/ theorem balanced_ball_zero : Balanced π•œ (Metric.ball (0 : E) r) := by rw [← ball_normSeminorm π•œ]
Mathlib.Analysis.Seminorm.1446_0.ywwMCgoKeIFKDZ3
/-- Balls at the origin are balanced. -/ theorem balanced_ball_zero : Balanced π•œ (Metric.ball (0 : E) r)
Mathlib_Analysis_Seminorm
α✝ : Type u_1 β✝ : Type u_2 Ξ± : Type u Ξ² : Type v inst✝¹ : Fintype Ξ± inst✝ : Fintype Ξ² ⊒ βˆ€ (x : Ξ± βŠ• Ξ²), x ∈ disjSum univ univ
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Fintype.Card import Mathlib.Data.Finset.Sum import Mathlib.Logic.Embedding.Set #align_import data.fintype.sum from "leanprover-community/mathlib"@"6623e6af705e97002a9054c1c05a980180276fc1" /-! ## Instances We provide the `Fintype` instance for the sum of two fintypes. -/ universe u v variable {Ξ± Ξ² : Type*} open Finset instance (Ξ± : Type u) (Ξ² : Type v) [Fintype Ξ±] [Fintype Ξ²] : Fintype (Sum Ξ± Ξ²) where elems := univ.disjSum univ complete := by
rintro (_ | _)
instance (Ξ± : Type u) (Ξ² : Type v) [Fintype Ξ±] [Fintype Ξ²] : Fintype (Sum Ξ± Ξ²) where elems := univ.disjSum univ complete := by
Mathlib.Data.Fintype.Sum.25_0.wOnqEoxEwKMN7BR
instance (Ξ± : Type u) (Ξ² : Type v) [Fintype Ξ±] [Fintype Ξ²] : Fintype (Sum Ξ± Ξ²) where elems
Mathlib_Data_Fintype_Sum
case inl α✝ : Type u_1 β✝ : Type u_2 α : Type u β : Type v inst✝¹ : Fintype α inst✝ : Fintype β val✝ : α ⊒ Sum.inl val✝ ∈ disjSum univ univ
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Fintype.Card import Mathlib.Data.Finset.Sum import Mathlib.Logic.Embedding.Set #align_import data.fintype.sum from "leanprover-community/mathlib"@"6623e6af705e97002a9054c1c05a980180276fc1" /-! ## Instances We provide the `Fintype` instance for the sum of two fintypes. -/ universe u v variable {Ξ± Ξ² : Type*} open Finset instance (Ξ± : Type u) (Ξ² : Type v) [Fintype Ξ±] [Fintype Ξ²] : Fintype (Sum Ξ± Ξ²) where elems := univ.disjSum univ complete := by rintro (_ | _) <;>
simp
instance (Ξ± : Type u) (Ξ² : Type v) [Fintype Ξ±] [Fintype Ξ²] : Fintype (Sum Ξ± Ξ²) where elems := univ.disjSum univ complete := by rintro (_ | _) <;>
Mathlib.Data.Fintype.Sum.25_0.wOnqEoxEwKMN7BR
instance (Ξ± : Type u) (Ξ² : Type v) [Fintype Ξ±] [Fintype Ξ²] : Fintype (Sum Ξ± Ξ²) where elems
Mathlib_Data_Fintype_Sum
case inr α✝ : Type u_1 β✝ : Type u_2 α : Type u β : Type v inst✝¹ : Fintype α inst✝ : Fintype β val✝ : β ⊒ Sum.inr val✝ ∈ disjSum univ univ
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Fintype.Card import Mathlib.Data.Finset.Sum import Mathlib.Logic.Embedding.Set #align_import data.fintype.sum from "leanprover-community/mathlib"@"6623e6af705e97002a9054c1c05a980180276fc1" /-! ## Instances We provide the `Fintype` instance for the sum of two fintypes. -/ universe u v variable {Ξ± Ξ² : Type*} open Finset instance (Ξ± : Type u) (Ξ² : Type v) [Fintype Ξ±] [Fintype Ξ²] : Fintype (Sum Ξ± Ξ²) where elems := univ.disjSum univ complete := by rintro (_ | _) <;>
simp
instance (Ξ± : Type u) (Ξ² : Type v) [Fintype Ξ±] [Fintype Ξ²] : Fintype (Sum Ξ± Ξ²) where elems := univ.disjSum univ complete := by rintro (_ | _) <;>
Mathlib.Data.Fintype.Sum.25_0.wOnqEoxEwKMN7BR
instance (Ξ± : Type u) (Ξ² : Type v) [Fintype Ξ±] [Fintype Ξ²] : Fintype (Sum Ξ± Ξ²) where elems
Mathlib_Data_Fintype_Sum
Ξ± : Type u_1 Ξ² : Type u_2 a : Ξ± h : Fintype { b // b β‰  a } ⊒ Function.Bijective (Sum.elim Subtype.val Subtype.val)
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Fintype.Card import Mathlib.Data.Finset.Sum import Mathlib.Logic.Embedding.Set #align_import data.fintype.sum from "leanprover-community/mathlib"@"6623e6af705e97002a9054c1c05a980180276fc1" /-! ## Instances We provide the `Fintype` instance for the sum of two fintypes. -/ universe u v variable {Ξ± Ξ² : Type*} open Finset instance (Ξ± : Type u) (Ξ² : Type v) [Fintype Ξ±] [Fintype Ξ²] : Fintype (Sum Ξ± Ξ²) where elems := univ.disjSum univ complete := by rintro (_ | _) <;> simp @[simp] theorem Finset.univ_disjSum_univ {Ξ± Ξ² : Type*} [Fintype Ξ±] [Fintype Ξ²] : univ.disjSum univ = (univ : Finset (Sum Ξ± Ξ²)) := rfl #align finset.univ_disj_sum_univ Finset.univ_disjSum_univ @[simp] theorem Fintype.card_sum [Fintype Ξ±] [Fintype Ξ²] : Fintype.card (Sum Ξ± Ξ²) = Fintype.card Ξ± + Fintype.card Ξ² := card_disjSum _ _ #align fintype.card_sum Fintype.card_sum /-- If the subtype of all-but-one elements is a `Fintype` then the type itself is a `Fintype`. -/ def fintypeOfFintypeNe (a : Ξ±) (h : Fintype { b // b β‰  a }) : Fintype Ξ± := Fintype.ofBijective (Sum.elim ((↑) : { b // b = a } β†’ Ξ±) ((↑) : { b // b β‰  a } β†’ Ξ±)) <| by
classical exact (Equiv.sumCompl (Β· = a)).bijective
/-- If the subtype of all-but-one elements is a `Fintype` then the type itself is a `Fintype`. -/ def fintypeOfFintypeNe (a : Ξ±) (h : Fintype { b // b β‰  a }) : Fintype Ξ± := Fintype.ofBijective (Sum.elim ((↑) : { b // b = a } β†’ Ξ±) ((↑) : { b // b β‰  a } β†’ Ξ±)) <| by
Mathlib.Data.Fintype.Sum.41_0.wOnqEoxEwKMN7BR
/-- If the subtype of all-but-one elements is a `Fintype` then the type itself is a `Fintype`. -/ def fintypeOfFintypeNe (a : Ξ±) (h : Fintype { b // b β‰  a }) : Fintype Ξ±
Mathlib_Data_Fintype_Sum
Ξ± : Type u_1 Ξ² : Type u_2 a : Ξ± h : Fintype { b // b β‰  a } ⊒ Function.Bijective (Sum.elim Subtype.val Subtype.val)
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Fintype.Card import Mathlib.Data.Finset.Sum import Mathlib.Logic.Embedding.Set #align_import data.fintype.sum from "leanprover-community/mathlib"@"6623e6af705e97002a9054c1c05a980180276fc1" /-! ## Instances We provide the `Fintype` instance for the sum of two fintypes. -/ universe u v variable {Ξ± Ξ² : Type*} open Finset instance (Ξ± : Type u) (Ξ² : Type v) [Fintype Ξ±] [Fintype Ξ²] : Fintype (Sum Ξ± Ξ²) where elems := univ.disjSum univ complete := by rintro (_ | _) <;> simp @[simp] theorem Finset.univ_disjSum_univ {Ξ± Ξ² : Type*} [Fintype Ξ±] [Fintype Ξ²] : univ.disjSum univ = (univ : Finset (Sum Ξ± Ξ²)) := rfl #align finset.univ_disj_sum_univ Finset.univ_disjSum_univ @[simp] theorem Fintype.card_sum [Fintype Ξ±] [Fintype Ξ²] : Fintype.card (Sum Ξ± Ξ²) = Fintype.card Ξ± + Fintype.card Ξ² := card_disjSum _ _ #align fintype.card_sum Fintype.card_sum /-- If the subtype of all-but-one elements is a `Fintype` then the type itself is a `Fintype`. -/ def fintypeOfFintypeNe (a : Ξ±) (h : Fintype { b // b β‰  a }) : Fintype Ξ± := Fintype.ofBijective (Sum.elim ((↑) : { b // b = a } β†’ Ξ±) ((↑) : { b // b β‰  a } β†’ Ξ±)) <| by classical
exact (Equiv.sumCompl (Β· = a)).bijective
/-- If the subtype of all-but-one elements is a `Fintype` then the type itself is a `Fintype`. -/ def fintypeOfFintypeNe (a : Ξ±) (h : Fintype { b // b β‰  a }) : Fintype Ξ± := Fintype.ofBijective (Sum.elim ((↑) : { b // b = a } β†’ Ξ±) ((↑) : { b // b β‰  a } β†’ Ξ±)) <| by classical
Mathlib.Data.Fintype.Sum.41_0.wOnqEoxEwKMN7BR
/-- If the subtype of all-but-one elements is a `Fintype` then the type itself is a `Fintype`. -/ def fintypeOfFintypeNe (a : Ξ±) (h : Fintype { b // b β‰  a }) : Fintype Ξ±
Mathlib_Data_Fintype_Sum