state
stringlengths
0
159k
srcUpToTactic
stringlengths
387
167k
nextTactic
stringlengths
3
9k
declUpToTactic
stringlengths
22
11.5k
declId
stringlengths
38
95
decl
stringlengths
16
1.89k
file_tag
stringlengths
17
73
case inl R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝¹⁸ : SeminormedRing π•œ inst✝¹⁷ : SeminormedRing π•œβ‚‚ inst✝¹⁢ : SeminormedRing π•œβ‚ƒ σ₁₂ : π•œ β†’+* π•œβ‚‚ inst✝¹⁡ : RingHomIsometric σ₁₂ σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ inst✝¹⁴ : RingHomIsometric σ₂₃ σ₁₃ : π•œ β†’+* π•œβ‚ƒ inst✝¹³ : RingHomIsometric σ₁₃ inst✝¹² : AddCommGroup E inst✝¹¹ : AddCommGroup Eβ‚‚ inst✝¹⁰ : AddCommGroup E₃ inst✝⁹ : AddCommGroup F inst✝⁸ : AddCommGroup G inst✝⁷ : Module π•œ E inst✝⁢ : Module π•œβ‚‚ Eβ‚‚ inst✝⁡ : Module π•œβ‚ƒ E₃ inst✝⁴ : Module π•œ F inst✝³ : Module π•œ G inst✝² : SMul R ℝ inst✝¹ : SMul R ℝβ‰₯0 inst✝ : IsScalarTower R ℝβ‰₯0 ℝ p : ΞΉ β†’ Seminorm π•œ E x : E ⊒ (Finset.sup βˆ… p) x = 0 ∨ βˆƒ i ∈ βˆ…, (Finset.sup βˆ… p) x = (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
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) Β·
Mathlib.Analysis.Seminorm.408_0.ywwMCgoKeIFKDZ3
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
Mathlib_Analysis_Seminorm
case inl.h R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝¹⁸ : SeminormedRing π•œ inst✝¹⁷ : SeminormedRing π•œβ‚‚ inst✝¹⁢ : SeminormedRing π•œβ‚ƒ σ₁₂ : π•œ β†’+* π•œβ‚‚ inst✝¹⁡ : RingHomIsometric σ₁₂ σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ inst✝¹⁴ : RingHomIsometric σ₂₃ σ₁₃ : π•œ β†’+* π•œβ‚ƒ inst✝¹³ : RingHomIsometric σ₁₃ inst✝¹² : AddCommGroup E inst✝¹¹ : AddCommGroup Eβ‚‚ inst✝¹⁰ : AddCommGroup E₃ inst✝⁹ : AddCommGroup F inst✝⁸ : AddCommGroup G inst✝⁷ : Module π•œ E inst✝⁢ : Module π•œβ‚‚ Eβ‚‚ inst✝⁡ : Module π•œβ‚ƒ E₃ inst✝⁴ : Module π•œ F inst✝³ : Module π•œ G inst✝² : SMul R ℝ inst✝¹ : SMul R ℝβ‰₯0 inst✝ : IsScalarTower R ℝβ‰₯0 ℝ p : ΞΉ β†’ Seminorm π•œ E x : E ⊒ (Finset.sup βˆ… p) x = 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
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;
Mathlib.Analysis.Seminorm.408_0.ywwMCgoKeIFKDZ3
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
Mathlib_Analysis_Seminorm
case inr R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝¹⁸ : SeminormedRing π•œ inst✝¹⁷ : SeminormedRing π•œβ‚‚ inst✝¹⁢ : SeminormedRing π•œβ‚ƒ σ₁₂ : π•œ β†’+* π•œβ‚‚ inst✝¹⁡ : RingHomIsometric σ₁₂ σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ inst✝¹⁴ : RingHomIsometric σ₂₃ σ₁₃ : π•œ β†’+* π•œβ‚ƒ inst✝¹³ : RingHomIsometric σ₁₃ inst✝¹² : AddCommGroup E inst✝¹¹ : AddCommGroup Eβ‚‚ inst✝¹⁰ : AddCommGroup E₃ inst✝⁹ : AddCommGroup F inst✝⁸ : AddCommGroup G inst✝⁷ : Module π•œ E inst✝⁢ : Module π•œβ‚‚ Eβ‚‚ inst✝⁡ : Module π•œβ‚ƒ E₃ inst✝⁴ : Module π•œ F inst✝³ : Module π•œ G inst✝² : SMul R ℝ inst✝¹ : SMul R ℝβ‰₯0 inst✝ : IsScalarTower R ℝβ‰₯0 ℝ p : ΞΉ β†’ Seminorm π•œ E s : Finset ΞΉ x : E hs : Finset.Nonempty s ⊒ (Finset.sup s p) x = 0 ∨ βˆƒ i ∈ s, (Finset.sup s p) x = (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
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 Β·
Mathlib.Analysis.Seminorm.408_0.ywwMCgoKeIFKDZ3
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
Mathlib_Analysis_Seminorm
case inr.h R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝¹⁸ : SeminormedRing π•œ inst✝¹⁷ : SeminormedRing π•œβ‚‚ inst✝¹⁢ : SeminormedRing π•œβ‚ƒ σ₁₂ : π•œ β†’+* π•œβ‚‚ inst✝¹⁡ : RingHomIsometric σ₁₂ σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ inst✝¹⁴ : RingHomIsometric σ₂₃ σ₁₃ : π•œ β†’+* π•œβ‚ƒ inst✝¹³ : RingHomIsometric σ₁₃ inst✝¹² : AddCommGroup E inst✝¹¹ : AddCommGroup Eβ‚‚ inst✝¹⁰ : AddCommGroup E₃ inst✝⁹ : AddCommGroup F inst✝⁸ : AddCommGroup G inst✝⁷ : Module π•œ E inst✝⁢ : Module π•œβ‚‚ Eβ‚‚ inst✝⁡ : Module π•œβ‚ƒ E₃ inst✝⁴ : Module π•œ F inst✝³ : Module π•œ G inst✝² : SMul R ℝ inst✝¹ : SMul R ℝβ‰₯0 inst✝ : IsScalarTower R ℝβ‰₯0 ℝ p : ΞΉ β†’ Seminorm π•œ E s : Finset ΞΉ x : E hs : Finset.Nonempty s ⊒ βˆƒ i ∈ s, (Finset.sup s p) x = (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 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;
Mathlib.Analysis.Seminorm.408_0.ywwMCgoKeIFKDZ3
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
Mathlib_Analysis_Seminorm
R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝¹⁸ : SeminormedRing π•œ inst✝¹⁷ : SeminormedRing π•œβ‚‚ inst✝¹⁢ : SeminormedRing π•œβ‚ƒ σ₁₂ : π•œ β†’+* π•œβ‚‚ inst✝¹⁡ : RingHomIsometric σ₁₂ σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ inst✝¹⁴ : RingHomIsometric σ₂₃ σ₁₃ : π•œ β†’+* π•œβ‚ƒ inst✝¹³ : RingHomIsometric σ₁₃ inst✝¹² : AddCommGroup E inst✝¹¹ : AddCommGroup Eβ‚‚ inst✝¹⁰ : AddCommGroup E₃ inst✝⁹ : AddCommGroup F inst✝⁸ : AddCommGroup G inst✝⁷ : Module π•œ E inst✝⁢ : Module π•œβ‚‚ Eβ‚‚ inst✝⁡ : Module π•œβ‚ƒ E₃ inst✝⁴ : Module π•œ F inst✝³ : Module π•œ G inst✝² : SMul R ℝ inst✝¹ : SMul R ℝβ‰₯0 inst✝ : IsScalarTower R ℝβ‰₯0 ℝ p : ΞΉ β†’ Seminorm π•œ E s : Finset ΞΉ C : ℝβ‰₯0 ⊒ Finset.sup s (C β€’ p) = C β€’ Finset.sup s 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
theorem finset_sup_smul (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (C : ℝβ‰₯0) : s.sup (C β€’ p) = C β€’ s.sup p := by
Mathlib.Analysis.Seminorm.414_0.ywwMCgoKeIFKDZ3
theorem finset_sup_smul (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (C : ℝβ‰₯0) : s.sup (C β€’ p) = C β€’ s.sup p
Mathlib_Analysis_Seminorm
case h R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝¹⁸ : SeminormedRing π•œ inst✝¹⁷ : SeminormedRing π•œβ‚‚ inst✝¹⁢ : SeminormedRing π•œβ‚ƒ σ₁₂ : π•œ β†’+* π•œβ‚‚ inst✝¹⁡ : RingHomIsometric σ₁₂ σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ inst✝¹⁴ : RingHomIsometric σ₂₃ σ₁₃ : π•œ β†’+* π•œβ‚ƒ inst✝¹³ : RingHomIsometric σ₁₃ inst✝¹² : AddCommGroup E inst✝¹¹ : AddCommGroup Eβ‚‚ inst✝¹⁰ : AddCommGroup E₃ inst✝⁹ : AddCommGroup F inst✝⁸ : AddCommGroup G inst✝⁷ : Module π•œ E inst✝⁢ : Module π•œβ‚‚ Eβ‚‚ inst✝⁡ : Module π•œβ‚ƒ E₃ inst✝⁴ : Module π•œ F inst✝³ : Module π•œ G inst✝² : SMul R ℝ inst✝¹ : SMul R ℝβ‰₯0 inst✝ : IsScalarTower R ℝβ‰₯0 ℝ p : ΞΉ β†’ Seminorm π•œ E s : Finset ΞΉ C : ℝβ‰₯0 x : E ⊒ (Finset.sup s (C β€’ p)) 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]
theorem finset_sup_smul (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (C : ℝβ‰₯0) : s.sup (C β€’ p) = C β€’ s.sup p := by ext x
Mathlib.Analysis.Seminorm.414_0.ywwMCgoKeIFKDZ3
theorem finset_sup_smul (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (C : ℝβ‰₯0) : s.sup (C β€’ p) = C β€’ s.sup p
Mathlib_Analysis_Seminorm
case h R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝¹⁸ : SeminormedRing π•œ inst✝¹⁷ : SeminormedRing π•œβ‚‚ inst✝¹⁢ : SeminormedRing π•œβ‚ƒ σ₁₂ : π•œ β†’+* π•œβ‚‚ inst✝¹⁡ : RingHomIsometric σ₁₂ σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ inst✝¹⁴ : RingHomIsometric σ₂₃ σ₁₃ : π•œ β†’+* π•œβ‚ƒ inst✝¹³ : RingHomIsometric σ₁₃ inst✝¹² : AddCommGroup E inst✝¹¹ : AddCommGroup Eβ‚‚ inst✝¹⁰ : AddCommGroup E₃ inst✝⁹ : AddCommGroup F inst✝⁸ : AddCommGroup G inst✝⁷ : Module π•œ E inst✝⁢ : Module π•œβ‚‚ Eβ‚‚ inst✝⁡ : Module π•œβ‚ƒ E₃ inst✝⁴ : Module π•œ F inst✝³ : Module π•œ G inst✝² : SMul R ℝ inst✝¹ : SMul R ℝβ‰₯0 inst✝ : IsScalarTower R ℝβ‰₯0 ℝ p : ΞΉ β†’ Seminorm π•œ E s : Finset ΞΉ C : ℝβ‰₯0 x : E ⊒ ↑(Finset.sup s fun i => { val := ((C β€’ p) i) x, property := (_ : 0 ≀ ((C β€’ p) i) x) }) = C β€’ ↑(Finset.sup s fun i => { val := (p i) x, property := (_ : 0 ≀ (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
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]
Mathlib.Analysis.Seminorm.414_0.ywwMCgoKeIFKDZ3
theorem finset_sup_smul (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (C : ℝβ‰₯0) : s.sup (C β€’ p) = C β€’ s.sup p
Mathlib_Analysis_Seminorm
case h R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝¹⁸ : SeminormedRing π•œ inst✝¹⁷ : SeminormedRing π•œβ‚‚ inst✝¹⁢ : SeminormedRing π•œβ‚ƒ σ₁₂ : π•œ β†’+* π•œβ‚‚ inst✝¹⁡ : RingHomIsometric σ₁₂ σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ inst✝¹⁴ : RingHomIsometric σ₂₃ σ₁₃ : π•œ β†’+* π•œβ‚ƒ inst✝¹³ : RingHomIsometric σ₁₃ inst✝¹² : AddCommGroup E inst✝¹¹ : AddCommGroup Eβ‚‚ inst✝¹⁰ : AddCommGroup E₃ inst✝⁹ : AddCommGroup F inst✝⁸ : AddCommGroup G inst✝⁷ : Module π•œ E inst✝⁢ : Module π•œβ‚‚ Eβ‚‚ inst✝⁡ : Module π•œβ‚ƒ E₃ inst✝⁴ : Module π•œ F inst✝³ : Module π•œ G inst✝² : SMul R ℝ inst✝¹ : SMul R ℝβ‰₯0 inst✝ : IsScalarTower R ℝβ‰₯0 ℝ p : ΞΉ β†’ Seminorm π•œ E s : Finset ΞΉ C : ℝβ‰₯0 x : E ⊒ C β€’ ↑(Finset.sup s fun i => { val := (p i) x, property := (_ : 0 ≀ (p i) x) }) = ↑(Finset.sup s fun i => { val := ((C β€’ p) i) x, property := (_ : 0 ≀ ((C β€’ 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_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
Mathlib.Analysis.Seminorm.414_0.ywwMCgoKeIFKDZ3
theorem finset_sup_smul (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (C : ℝβ‰₯0) : s.sup (C β€’ p) = C β€’ s.sup 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✝¹⁸ : SeminormedRing π•œ inst✝¹⁷ : SeminormedRing π•œβ‚‚ inst✝¹⁢ : SeminormedRing π•œβ‚ƒ σ₁₂ : π•œ β†’+* π•œβ‚‚ inst✝¹⁡ : RingHomIsometric σ₁₂ σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ inst✝¹⁴ : RingHomIsometric σ₂₃ σ₁₃ : π•œ β†’+* π•œβ‚ƒ inst✝¹³ : RingHomIsometric σ₁₃ inst✝¹² : AddCommGroup E inst✝¹¹ : AddCommGroup Eβ‚‚ inst✝¹⁰ : AddCommGroup E₃ inst✝⁹ : AddCommGroup F inst✝⁸ : AddCommGroup G inst✝⁷ : Module π•œ E inst✝⁢ : Module π•œβ‚‚ Eβ‚‚ inst✝⁡ : Module π•œβ‚ƒ E₃ inst✝⁴ : Module π•œ F inst✝³ : Module π•œ G inst✝² : SMul R ℝ inst✝¹ : SMul R ℝβ‰₯0 inst✝ : IsScalarTower R ℝβ‰₯0 ℝ p : ΞΉ β†’ Seminorm π•œ E s : Finset ΞΉ ⊒ Finset.sup s p ≀ βˆ‘ i in s, p 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
theorem finset_sup_le_sum (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) : s.sup p ≀ βˆ‘ i in s, p i := by
Mathlib.Analysis.Seminorm.421_0.ywwMCgoKeIFKDZ3
theorem finset_sup_le_sum (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) : s.sup p ≀ βˆ‘ i in s, p i
Mathlib_Analysis_Seminorm
R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝¹⁸ : SeminormedRing π•œ inst✝¹⁷ : SeminormedRing π•œβ‚‚ inst✝¹⁢ : SeminormedRing π•œβ‚ƒ σ₁₂ : π•œ β†’+* π•œβ‚‚ inst✝¹⁡ : RingHomIsometric σ₁₂ σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ inst✝¹⁴ : RingHomIsometric σ₂₃ σ₁₃ : π•œ β†’+* π•œβ‚ƒ inst✝¹³ : RingHomIsometric σ₁₃ inst✝¹² : AddCommGroup E inst✝¹¹ : AddCommGroup Eβ‚‚ inst✝¹⁰ : AddCommGroup E₃ inst✝⁹ : AddCommGroup F inst✝⁸ : AddCommGroup G inst✝⁷ : Module π•œ E inst✝⁢ : Module π•œβ‚‚ Eβ‚‚ inst✝⁡ : Module π•œβ‚ƒ E₃ inst✝⁴ : Module π•œ F inst✝³ : Module π•œ G inst✝² : SMul R ℝ inst✝¹ : SMul R ℝβ‰₯0 inst✝ : IsScalarTower R ℝβ‰₯0 ℝ p : ΞΉ β†’ Seminorm π•œ E s : Finset ΞΉ ⊒ Finset.sup s p ≀ βˆ‘ i in s, p 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 _
theorem finset_sup_le_sum (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) : s.sup p ≀ βˆ‘ i in s, p i := by classical
Mathlib.Analysis.Seminorm.421_0.ywwMCgoKeIFKDZ3
theorem finset_sup_le_sum (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) : s.sup p ≀ βˆ‘ i in s, p i
Mathlib_Analysis_Seminorm
R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝¹⁸ : SeminormedRing π•œ inst✝¹⁷ : SeminormedRing π•œβ‚‚ inst✝¹⁢ : SeminormedRing π•œβ‚ƒ σ₁₂ : π•œ β†’+* π•œβ‚‚ inst✝¹⁡ : RingHomIsometric σ₁₂ σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ inst✝¹⁴ : RingHomIsometric σ₂₃ σ₁₃ : π•œ β†’+* π•œβ‚ƒ inst✝¹³ : RingHomIsometric σ₁₃ inst✝¹² : AddCommGroup E inst✝¹¹ : AddCommGroup Eβ‚‚ inst✝¹⁰ : AddCommGroup E₃ inst✝⁹ : AddCommGroup F inst✝⁸ : AddCommGroup G inst✝⁷ : Module π•œ E inst✝⁢ : Module π•œβ‚‚ Eβ‚‚ inst✝⁡ : Module π•œβ‚ƒ E₃ inst✝⁴ : Module π•œ F inst✝³ : Module π•œ G inst✝² : SMul R ℝ inst✝¹ : SMul R ℝβ‰₯0 inst✝ : IsScalarTower R ℝβ‰₯0 ℝ p : ΞΉ β†’ Seminorm π•œ E s : Finset ΞΉ ⊒ βˆ€ b ∈ s, p b ≀ βˆ‘ i in s, p 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
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 _
Mathlib.Analysis.Seminorm.421_0.ywwMCgoKeIFKDZ3
theorem finset_sup_le_sum (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) : s.sup p ≀ βˆ‘ i in s, p i
Mathlib_Analysis_Seminorm
R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝¹⁸ : SeminormedRing π•œ inst✝¹⁷ : SeminormedRing π•œβ‚‚ inst✝¹⁢ : SeminormedRing π•œβ‚ƒ σ₁₂ : π•œ β†’+* π•œβ‚‚ inst✝¹⁡ : RingHomIsometric σ₁₂ σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ inst✝¹⁴ : RingHomIsometric σ₂₃ σ₁₃ : π•œ β†’+* π•œβ‚ƒ inst✝¹³ : RingHomIsometric σ₁₃ inst✝¹² : AddCommGroup E inst✝¹¹ : AddCommGroup Eβ‚‚ inst✝¹⁰ : AddCommGroup E₃ inst✝⁹ : AddCommGroup F inst✝⁸ : AddCommGroup G inst✝⁷ : Module π•œ E inst✝⁢ : Module π•œβ‚‚ Eβ‚‚ inst✝⁡ : Module π•œβ‚ƒ E₃ inst✝⁴ : Module π•œ F inst✝³ : Module π•œ G inst✝² : SMul R ℝ inst✝¹ : SMul R ℝβ‰₯0 inst✝ : IsScalarTower R ℝβ‰₯0 ℝ p : ΞΉ β†’ Seminorm π•œ E s : Finset ΞΉ i : ΞΉ hi : i ∈ s ⊒ p i ≀ βˆ‘ i in s, p 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]
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
Mathlib.Analysis.Seminorm.421_0.ywwMCgoKeIFKDZ3
theorem finset_sup_le_sum (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) : s.sup p ≀ βˆ‘ i in s, p i
Mathlib_Analysis_Seminorm
R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝¹⁸ : SeminormedRing π•œ inst✝¹⁷ : SeminormedRing π•œβ‚‚ inst✝¹⁢ : SeminormedRing π•œβ‚ƒ σ₁₂ : π•œ β†’+* π•œβ‚‚ inst✝¹⁡ : RingHomIsometric σ₁₂ σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ inst✝¹⁴ : RingHomIsometric σ₂₃ σ₁₃ : π•œ β†’+* π•œβ‚ƒ inst✝¹³ : RingHomIsometric σ₁₃ inst✝¹² : AddCommGroup E inst✝¹¹ : AddCommGroup Eβ‚‚ inst✝¹⁰ : AddCommGroup E₃ inst✝⁹ : AddCommGroup F inst✝⁸ : AddCommGroup G inst✝⁷ : Module π•œ E inst✝⁢ : Module π•œβ‚‚ Eβ‚‚ inst✝⁡ : Module π•œβ‚ƒ E₃ inst✝⁴ : Module π•œ F inst✝³ : Module π•œ G inst✝² : SMul R ℝ inst✝¹ : SMul R ℝβ‰₯0 inst✝ : IsScalarTower R ℝβ‰₯0 ℝ p : ΞΉ β†’ Seminorm π•œ E s : Finset ΞΉ i : ΞΉ hi : i ∈ s ⊒ 0 ≀ βˆ‘ x in s \ {i}, 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
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]
Mathlib.Analysis.Seminorm.421_0.ywwMCgoKeIFKDZ3
theorem finset_sup_le_sum (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) : s.sup p ≀ βˆ‘ i in s, p i
Mathlib_Analysis_Seminorm
R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝¹⁸ : SeminormedRing π•œ inst✝¹⁷ : SeminormedRing π•œβ‚‚ inst✝¹⁢ : SeminormedRing π•œβ‚ƒ σ₁₂ : π•œ β†’+* π•œβ‚‚ inst✝¹⁡ : RingHomIsometric σ₁₂ σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ inst✝¹⁴ : RingHomIsometric σ₂₃ σ₁₃ : π•œ β†’+* π•œβ‚ƒ inst✝¹³ : RingHomIsometric σ₁₃ inst✝¹² : AddCommGroup E inst✝¹¹ : AddCommGroup Eβ‚‚ inst✝¹⁰ : AddCommGroup E₃ inst✝⁹ : AddCommGroup F inst✝⁸ : AddCommGroup G inst✝⁷ : Module π•œ E inst✝⁢ : Module π•œβ‚‚ Eβ‚‚ inst✝⁡ : Module π•œβ‚ƒ E₃ inst✝⁴ : Module π•œ F inst✝³ : Module π•œ G inst✝² : SMul R ℝ inst✝¹ : SMul R ℝβ‰₯0 inst✝ : IsScalarTower R ℝβ‰₯0 ℝ p : ΞΉ β†’ Seminorm π•œ E s : Finset ΞΉ x : E a : ℝ ha : 0 ≀ a h : βˆ€ i ∈ s, (p i) x ≀ a ⊒ (Finset.sup s p) x ≀ 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
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
Mathlib.Analysis.Seminorm.429_0.ywwMCgoKeIFKDZ3
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
Mathlib_Analysis_Seminorm
case intro R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝¹⁸ : SeminormedRing π•œ inst✝¹⁷ : SeminormedRing π•œβ‚‚ inst✝¹⁢ : SeminormedRing π•œβ‚ƒ σ₁₂ : π•œ β†’+* π•œβ‚‚ inst✝¹⁡ : RingHomIsometric σ₁₂ σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ inst✝¹⁴ : RingHomIsometric σ₂₃ σ₁₃ : π•œ β†’+* π•œβ‚ƒ inst✝¹³ : RingHomIsometric σ₁₃ inst✝¹² : AddCommGroup E inst✝¹¹ : AddCommGroup Eβ‚‚ inst✝¹⁰ : AddCommGroup E₃ inst✝⁹ : AddCommGroup F inst✝⁸ : AddCommGroup G inst✝⁷ : Module π•œ E inst✝⁢ : Module π•œβ‚‚ Eβ‚‚ inst✝⁡ : Module π•œβ‚ƒ E₃ inst✝⁴ : Module π•œ F inst✝³ : Module π•œ G inst✝² : SMul R ℝ inst✝¹ : SMul R ℝβ‰₯0 inst✝ : IsScalarTower R ℝβ‰₯0 ℝ p : ΞΉ β†’ Seminorm π•œ E s : Finset ΞΉ x : E a : ℝβ‰₯0 h : βˆ€ i ∈ s, (p i) x ≀ ↑a ⊒ (Finset.sup s p) x ≀ ↑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]
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
Mathlib.Analysis.Seminorm.429_0.ywwMCgoKeIFKDZ3
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
Mathlib_Analysis_Seminorm
case intro R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝¹⁸ : SeminormedRing π•œ inst✝¹⁷ : SeminormedRing π•œβ‚‚ inst✝¹⁢ : SeminormedRing π•œβ‚ƒ σ₁₂ : π•œ β†’+* π•œβ‚‚ inst✝¹⁡ : RingHomIsometric σ₁₂ σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ inst✝¹⁴ : RingHomIsometric σ₂₃ σ₁₃ : π•œ β†’+* π•œβ‚ƒ inst✝¹³ : RingHomIsometric σ₁₃ inst✝¹² : AddCommGroup E inst✝¹¹ : AddCommGroup Eβ‚‚ inst✝¹⁰ : AddCommGroup E₃ inst✝⁹ : AddCommGroup F inst✝⁸ : AddCommGroup G inst✝⁷ : Module π•œ E inst✝⁢ : Module π•œβ‚‚ Eβ‚‚ inst✝⁡ : Module π•œβ‚ƒ E₃ inst✝⁴ : Module π•œ F inst✝³ : Module π•œ G inst✝² : SMul R ℝ inst✝¹ : SMul R ℝβ‰₯0 inst✝ : IsScalarTower R ℝβ‰₯0 ℝ p : ΞΉ β†’ Seminorm π•œ E s : Finset ΞΉ x : E a : ℝβ‰₯0 h : βˆ€ i ∈ s, (p i) x ≀ ↑a ⊒ (Finset.sup s fun i => { val := (p i) x, property := (_ : 0 ≀ (p i) x) }) ≀ 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
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]
Mathlib.Analysis.Seminorm.429_0.ywwMCgoKeIFKDZ3
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
Mathlib_Analysis_Seminorm
R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝¹⁸ : SeminormedRing π•œ inst✝¹⁷ : SeminormedRing π•œβ‚‚ inst✝¹⁢ : SeminormedRing π•œβ‚ƒ σ₁₂ : π•œ β†’+* π•œβ‚‚ inst✝¹⁡ : RingHomIsometric σ₁₂ σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ inst✝¹⁴ : RingHomIsometric σ₂₃ σ₁₃ : π•œ β†’+* π•œβ‚ƒ inst✝¹³ : RingHomIsometric σ₁₃ inst✝¹² : AddCommGroup E inst✝¹¹ : AddCommGroup Eβ‚‚ inst✝¹⁰ : AddCommGroup E₃ inst✝⁹ : AddCommGroup F inst✝⁸ : AddCommGroup G inst✝⁷ : Module π•œ E inst✝⁢ : Module π•œβ‚‚ Eβ‚‚ inst✝⁡ : Module π•œβ‚ƒ E₃ inst✝⁴ : Module π•œ F inst✝³ : Module π•œ G inst✝² : SMul R ℝ inst✝¹ : SMul R ℝβ‰₯0 inst✝ : IsScalarTower R ℝβ‰₯0 ℝ p : ΞΉ β†’ Seminorm π•œ E s : Finset ΞΉ x : E a : ℝ ha : 0 < a h : βˆ€ i ∈ s, (p i) x < a ⊒ (Finset.sup s p) x < 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
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
Mathlib.Analysis.Seminorm.440_0.ywwMCgoKeIFKDZ3
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
Mathlib_Analysis_Seminorm
case intro R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝¹⁸ : SeminormedRing π•œ inst✝¹⁷ : SeminormedRing π•œβ‚‚ inst✝¹⁢ : SeminormedRing π•œβ‚ƒ σ₁₂ : π•œ β†’+* π•œβ‚‚ inst✝¹⁡ : RingHomIsometric σ₁₂ σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ inst✝¹⁴ : RingHomIsometric σ₂₃ σ₁₃ : π•œ β†’+* π•œβ‚ƒ inst✝¹³ : RingHomIsometric σ₁₃ inst✝¹² : AddCommGroup E inst✝¹¹ : AddCommGroup Eβ‚‚ inst✝¹⁰ : AddCommGroup E₃ inst✝⁹ : AddCommGroup F inst✝⁸ : AddCommGroup G inst✝⁷ : Module π•œ E inst✝⁢ : Module π•œβ‚‚ Eβ‚‚ inst✝⁡ : Module π•œβ‚ƒ E₃ inst✝⁴ : Module π•œ F inst✝³ : Module π•œ G inst✝² : SMul R ℝ inst✝¹ : SMul R ℝβ‰₯0 inst✝ : IsScalarTower R ℝβ‰₯0 ℝ p : ΞΉ β†’ Seminorm π•œ E s : Finset ΞΉ x : E a : ℝβ‰₯0 ha : 0 < ↑a h : βˆ€ i ∈ s, (p i) x < ↑a ⊒ (Finset.sup s p) x < ↑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]
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
Mathlib.Analysis.Seminorm.440_0.ywwMCgoKeIFKDZ3
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
Mathlib_Analysis_Seminorm
case intro R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝¹⁸ : SeminormedRing π•œ inst✝¹⁷ : SeminormedRing π•œβ‚‚ inst✝¹⁢ : SeminormedRing π•œβ‚ƒ σ₁₂ : π•œ β†’+* π•œβ‚‚ inst✝¹⁡ : RingHomIsometric σ₁₂ σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ inst✝¹⁴ : RingHomIsometric σ₂₃ σ₁₃ : π•œ β†’+* π•œβ‚ƒ inst✝¹³ : RingHomIsometric σ₁₃ inst✝¹² : AddCommGroup E inst✝¹¹ : AddCommGroup Eβ‚‚ inst✝¹⁰ : AddCommGroup E₃ inst✝⁹ : AddCommGroup F inst✝⁸ : AddCommGroup G inst✝⁷ : Module π•œ E inst✝⁢ : Module π•œβ‚‚ Eβ‚‚ inst✝⁡ : Module π•œβ‚ƒ E₃ inst✝⁴ : Module π•œ F inst✝³ : Module π•œ G inst✝² : SMul R ℝ inst✝¹ : SMul R ℝβ‰₯0 inst✝ : IsScalarTower R ℝβ‰₯0 ℝ p : ΞΉ β†’ Seminorm π•œ E s : Finset ΞΉ x : E a : ℝβ‰₯0 ha : 0 < ↑a h : βˆ€ i ∈ s, (p i) x < ↑a ⊒ βˆ€ b ∈ s, { val := (p b) x, property := (_ : 0 ≀ (p b) x) } < 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
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] Β·
Mathlib.Analysis.Seminorm.440_0.ywwMCgoKeIFKDZ3
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
Mathlib_Analysis_Seminorm
case intro R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝¹⁸ : SeminormedRing π•œ inst✝¹⁷ : SeminormedRing π•œβ‚‚ inst✝¹⁢ : SeminormedRing π•œβ‚ƒ σ₁₂ : π•œ β†’+* π•œβ‚‚ inst✝¹⁡ : RingHomIsometric σ₁₂ σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ inst✝¹⁴ : RingHomIsometric σ₂₃ σ₁₃ : π•œ β†’+* π•œβ‚ƒ inst✝¹³ : RingHomIsometric σ₁₃ inst✝¹² : AddCommGroup E inst✝¹¹ : AddCommGroup Eβ‚‚ inst✝¹⁰ : AddCommGroup E₃ inst✝⁹ : AddCommGroup F inst✝⁸ : AddCommGroup G inst✝⁷ : Module π•œ E inst✝⁢ : Module π•œβ‚‚ Eβ‚‚ inst✝⁡ : Module π•œβ‚ƒ E₃ inst✝⁴ : Module π•œ F inst✝³ : Module π•œ G inst✝² : SMul R ℝ inst✝¹ : SMul R ℝβ‰₯0 inst✝ : IsScalarTower R ℝβ‰₯0 ℝ p : ΞΉ β†’ Seminorm π•œ E s : Finset ΞΉ x : E a : ℝβ‰₯0 ha : 0 < ↑a h : βˆ€ i ∈ s, (p i) x < ↑a ⊒ βŠ₯ < 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
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 Β·
Mathlib.Analysis.Seminorm.440_0.ywwMCgoKeIFKDZ3
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
Mathlib_Analysis_Seminorm
R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝⁢ : SeminormedRing π•œ inst✝⁡ : SeminormedCommRing π•œβ‚‚ σ₁₂ : π•œ β†’+* π•œβ‚‚ inst✝⁴ : RingHomIsometric σ₁₂ inst✝³ : AddCommGroup E inst✝² : AddCommGroup Eβ‚‚ inst✝¹ : Module π•œ E inst✝ : Module π•œβ‚‚ Eβ‚‚ p : Seminorm π•œβ‚‚ Eβ‚‚ f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚ c : π•œβ‚‚ x✝ : E ⊒ (comp p (c β€’ f)) x✝ = (β€–cβ€–β‚Š β€’ comp p f) 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]
theorem comp_smul (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) : p.comp (c β€’ f) = β€–cβ€–β‚Š β€’ p.comp f := ext fun _ => by
Mathlib.Analysis.Seminorm.464_0.ywwMCgoKeIFKDZ3
theorem comp_smul (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) : p.comp (c β€’ f) = β€–cβ€–β‚Š β€’ p.comp f
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 x : E ⊒ 0 ∈ lowerBounds (range fun u => p u + q (x - u))
/- 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⟩
/-- 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
Mathlib.Analysis.Seminorm.482_0.ywwMCgoKeIFKDZ3
/-- 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))
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 q : Seminorm π•œ E x✝ x : E ⊒ 0 ≀ (fun u => p u + q (x✝ - u)) 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
/-- 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⟩
Mathlib.Analysis.Seminorm.482_0.ywwMCgoKeIFKDZ3
/-- 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))
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 q : Seminorm π•œ E x✝ x : E ⊒ 0 ≀ p x + q (x✝ - x)
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, YaΓ«l Dillies, Moritz Doll -/ import Mathlib.Data.Real.Pointwise import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.LocallyConvex.Basic import Mathlib.Analysis.Normed.Group.AddTorsor #align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c" /-! # Seminorms This file defines seminorms. A seminorm is a function to the reals which is positive-semidefinite, absolutely homogeneous, and subadditive. They are closely related to convex sets, and a topological vector space is locally convex if and only if its topology is induced by a family of seminorms. ## Main declarations For a module over a normed ring: * `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and subadditive. * `normSeminorm π•œ E`: The norm on `E` as a seminorm. ## References * [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966] ## Tags seminorm, locally convex, LCTVS -/ set_option autoImplicit true open NormedField Set Filter open scoped BigOperators NNReal Pointwise Topology Uniformity variable {R R' π•œ π•œβ‚‚ π•œβ‚ƒ 𝕝 E Eβ‚‚ E₃ F G ΞΉ : Type*} /-- A seminorm on a module over a normed ring is a function to the reals that is positive semidefinite, positive homogeneous, and subadditive. -/ structure Seminorm (π•œ : Type*) (E : Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminorm E where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ smul' : βˆ€ (a : π•œ) (x : E), toFun (a β€’ x) = β€–aβ€– * toFun x #align seminorm Seminorm attribute [nolint docBlame] Seminorm.toAddGroupSeminorm /-- `SeminormClass F π•œ E` states that `F` is a type of seminorms on the `π•œ`-module `E`. You should extend this class when you extend `Seminorm`. -/ class SeminormClass (F : Type*) (π•œ E : outParam <| Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminormClass F E ℝ where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ map_smul_eq_mul (f : F) (a : π•œ) (x : E) : f (a β€’ x) = β€–aβ€– * f x #align seminorm_class SeminormClass export SeminormClass (map_smul_eq_mul) -- Porting note: dangerous instances no longer exist -- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass section Of /-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a `SeminormedRing π•œ`. -/ def Seminorm.of [SeminormedRing π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (add_le : βˆ€ x y : E, f (x + y) ≀ f x + f y) (smul : βˆ€ (a : π•œ) (x : E), f (a β€’ x) = β€–aβ€– * f x) : Seminorm π•œ E where toFun := f map_zero' := by rw [← zero_smul π•œ (0 : E), smul, norm_zero, zero_mul] add_le' := add_le smul' := smul neg' x := by rw [← neg_one_smul π•œ, smul, norm_neg, ← smul, one_smul] #align seminorm.of Seminorm.of /-- Alternative constructor for a `Seminorm` over a normed field `π•œ` that only assumes `f 0 = 0` and an inequality for the scalar multiplication. -/ def Seminorm.ofSMulLE [NormedField π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (map_zero : f 0 = 0) (add_le : βˆ€ x y, f (x + y) ≀ f x + f y) (smul_le : βˆ€ (r : π•œ) (x), f (r β€’ x) ≀ β€–rβ€– * f x) : Seminorm π•œ E := Seminorm.of f add_le fun r x => by refine' le_antisymm (smul_le r x) _ by_cases h : r = 0 Β· simp [h, map_zero] rw [← mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))] rw [inv_mul_cancel_leftβ‚€ (norm_ne_zero_iff.mpr h)] specialize smul_le r⁻¹ (r β€’ x) rw [norm_inv] at smul_le convert smul_le simp [h] #align seminorm.of_smul_le Seminorm.ofSMulLE end Of namespace Seminorm section SeminormedRing variable [SeminormedRing π•œ] section AddGroup variable [AddGroup E] section SMul variable [SMul π•œ E] instance instSeminormClass : SeminormClass (Seminorm π•œ E) π•œ E where coe f := f.toFun coe_injective' f g h := by rcases f with ⟨⟨_⟩⟩ rcases g with ⟨⟨_⟩⟩ congr map_zero f := f.map_zero' map_add_le_add f := f.add_le' map_neg_eq_map f := f.neg' map_smul_eq_mul f := f.smul' #align seminorm.seminorm_class Seminorm.instSeminormClass /-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/ instance instCoeFun : CoeFun (Seminorm π•œ E) fun _ => E β†’ ℝ := FunLike.hasCoeToFun @[ext] theorem ext {p q : Seminorm π•œ E} (h : βˆ€ x, (p : E β†’ ℝ) x = q x) : p = q := FunLike.ext p q h #align seminorm.ext Seminorm.ext instance instZero : Zero (Seminorm π•œ E) := ⟨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with smul' := fun _ _ => (mul_zero _).symm }⟩ @[simp] theorem coe_zero : ⇑(0 : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_zero Seminorm.coe_zero @[simp] theorem zero_apply (x : E) : (0 : Seminorm π•œ E) x = 0 := rfl #align seminorm.zero_apply Seminorm.zero_apply instance : Inhabited (Seminorm π•œ E) := ⟨0⟩ variable (p : Seminorm π•œ E) (c : π•œ) (x y : E) (r : ℝ) /-- Any action on `ℝ` which factors through `ℝβ‰₯0` applies to a seminorm. -/ instance instSMul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : SMul R (Seminorm π•œ E) where smul r p := { r β€’ p.toAddGroupSeminorm with toFun := fun x => r β€’ p x smul' := fun _ _ => by simp only [← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul] rw [map_smul_eq_mul, mul_left_comm] } instance [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] [SMul R' ℝ] [SMul R' ℝβ‰₯0] [IsScalarTower R' ℝβ‰₯0 ℝ] [SMul R R'] [IsScalarTower R R' ℝ] : IsScalarTower R R' (Seminorm π•œ E) where smul_assoc r a p := ext fun x => smul_assoc r a (p x) theorem coe_smul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) : ⇑(r β€’ p) = r β€’ ⇑p := rfl #align seminorm.coe_smul Seminorm.coe_smul @[simp] theorem smul_apply [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) (x : E) : (r β€’ p) x = r β€’ p x := rfl #align seminorm.smul_apply Seminorm.smul_apply instance instAdd : Add (Seminorm π•œ E) where add p q := { p.toAddGroupSeminorm + q.toAddGroupSeminorm with toFun := fun x => p x + q x smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] } theorem coe_add (p q : Seminorm π•œ E) : ⇑(p + q) = p + q := rfl #align seminorm.coe_add Seminorm.coe_add @[simp] theorem add_apply (p q : Seminorm π•œ E) (x : E) : (p + q) x = p x + q x := rfl #align seminorm.add_apply Seminorm.add_apply instance instAddMonoid : AddMonoid (Seminorm π•œ E) := FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π•œ E) := FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl instance instMulAction [Monoid R] [MulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : MulAction R (Seminorm π•œ E) := FunLike.coe_injective.mulAction _ (by intros; rfl) variable (π•œ E) /-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π•œ E` is a module. -/ @[simps] def coeFnAddMonoidHom : AddMonoidHom (Seminorm π•œ E) (E β†’ ℝ) where toFun := (↑) map_zero' := coe_zero map_add' := coe_add #align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π•œ E) := show @Function.Injective (Seminorm π•œ E) (E β†’ ℝ) (↑) from FunLike.coe_injective #align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective variable {π•œ E} instance instDistribMulAction [Monoid R] [DistribMulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : DistribMulAction R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).distribMulAction _ (by intros; rfl) instance instModule [Semiring R] [Module R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : Module R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).module R _ (by intros; rfl) instance instSup : Sup (Seminorm π•œ E) where sup p q := { p.toAddGroupSeminorm βŠ” q.toAddGroupSeminorm with toFun := p βŠ” q smul' := fun x v => (congr_argβ‚‚ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <| (mul_max_of_nonneg _ _ <| norm_nonneg x).symm } @[simp] theorem coe_sup (p q : Seminorm π•œ E) : ⇑(p βŠ” q) = (p : E β†’ ℝ) βŠ” (q : E β†’ ℝ) := rfl #align seminorm.coe_sup Seminorm.coe_sup theorem sup_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ” q) x = p x βŠ” q x := rfl #align seminorm.sup_apply Seminorm.sup_apply theorem smul_sup [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ” q) = r β€’ p βŠ” r β€’ q := have real.smul_max : βˆ€ x y : ℝ, r β€’ max x y = max (r β€’ x) (r β€’ y) := fun x y => by simpa only [← smul_eq_mul, ← NNReal.smul_def, smul_one_smul ℝβ‰₯0 r (_ : ℝ)] using mul_max_of_nonneg x y (r β€’ (1 : ℝβ‰₯0) : ℝβ‰₯0).coe_nonneg ext fun x => real.smul_max _ _ #align seminorm.smul_sup Seminorm.smul_sup instance instPartialOrder : PartialOrder (Seminorm π•œ E) := PartialOrder.lift _ FunLike.coe_injective @[simp, norm_cast] theorem coe_le_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) ≀ q ↔ p ≀ q := Iff.rfl #align seminorm.coe_le_coe Seminorm.coe_le_coe @[simp, norm_cast] theorem coe_lt_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) < q ↔ p < q := Iff.rfl #align seminorm.coe_lt_coe Seminorm.coe_lt_coe theorem le_def {p q : Seminorm π•œ E} : p ≀ q ↔ βˆ€ x, p x ≀ q x := Iff.rfl #align seminorm.le_def Seminorm.le_def theorem lt_def {p q : Seminorm π•œ E} : p < q ↔ p ≀ q ∧ βˆƒ x, p x < q x := @Pi.lt_def _ _ _ p q #align seminorm.lt_def Seminorm.lt_def instance instSemilatticeSup : SemilatticeSup (Seminorm π•œ E) := Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup end SMul end AddGroup section Module variable [SeminormedRing π•œβ‚‚] [SeminormedRing π•œβ‚ƒ] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable {σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₂₃] variable {σ₁₃ : π•œ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₁₃] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [AddCommGroup E₃] variable [AddCommGroup F] [AddCommGroup G] variable [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] [Module π•œβ‚ƒ E₃] [Module π•œ F] [Module π•œ G] -- Porting note: even though this instance is found immediately by typeclass search, -- it seems to be needed below!? noncomputable instance smul_nnreal_real : SMul ℝβ‰₯0 ℝ := inferInstance variable [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] /-- Composition of a seminorm with a linear map is a seminorm. -/ def comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œ E := { p.toAddGroupSeminorm.comp f.toAddMonoidHom with toFun := fun x => p (f x) -- Porting note: the `simp only` below used to be part of the `rw`. -- I'm not sure why this change was needed, and am worried by it! smul' := fun _ _ => by simp only [map_smulβ‚›β‚—]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] } #align seminorm.comp Seminorm.comp theorem coe_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : ⇑(p.comp f) = p ∘ f := rfl #align seminorm.coe_comp Seminorm.coe_comp @[simp] theorem comp_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (x : E) : (p.comp f) x = p (f x) := rfl #align seminorm.comp_apply Seminorm.comp_apply @[simp] theorem comp_id (p : Seminorm π•œ E) : p.comp LinearMap.id = p := ext fun _ => rfl #align seminorm.comp_id Seminorm.comp_id @[simp] theorem comp_zero (p : Seminorm π•œβ‚‚ Eβ‚‚) : p.comp (0 : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) = 0 := ext fun _ => map_zero p #align seminorm.comp_zero Seminorm.comp_zero @[simp] theorem zero_comp (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (0 : Seminorm π•œβ‚‚ Eβ‚‚).comp f = 0 := ext fun _ => rfl #align seminorm.zero_comp Seminorm.zero_comp theorem comp_comp [RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] (p : Seminorm π•œβ‚ƒ E₃) (g : Eβ‚‚ β†’β‚›β‚—[σ₂₃] E₃) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (g.comp f) = (p.comp g).comp f := ext fun _ => rfl #align seminorm.comp_comp Seminorm.comp_comp theorem add_comp (p q : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (p + q).comp f = p.comp f + q.comp f := ext fun _ => rfl #align seminorm.add_comp Seminorm.add_comp theorem comp_add_le (p : Seminorm π•œβ‚‚ Eβ‚‚) (f g : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (f + g) ≀ p.comp f + p.comp g := fun _ => map_add_le_add p _ _ #align seminorm.comp_add_le Seminorm.comp_add_le theorem smul_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : R) : (c β€’ p).comp f = c β€’ p.comp f := ext fun _ => rfl #align seminorm.smul_comp Seminorm.smul_comp theorem comp_mono {p q : Seminorm π•œβ‚‚ Eβ‚‚} (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (hp : p ≀ q) : p.comp f ≀ q.comp f := fun _ => hp _ #align seminorm.comp_mono Seminorm.comp_mono /-- The composition as an `AddMonoidHom`. -/ @[simps] def pullback (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œβ‚‚ Eβ‚‚ β†’+ Seminorm π•œ E where toFun := fun p => p.comp f map_zero' := zero_comp f map_add' := fun p q => add_comp p q f #align seminorm.pullback Seminorm.pullback instance instOrderBot : OrderBot (Seminorm π•œ E) where bot := 0 bot_le := map_nonneg @[simp] theorem coe_bot : ⇑(βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_bot Seminorm.coe_bot theorem bot_eq_zero : (βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.bot_eq_zero Seminorm.bot_eq_zero theorem smul_le_smul {p q : Seminorm π•œ E} {a b : ℝβ‰₯0} (hpq : p ≀ q) (hab : a ≀ b) : a β€’ p ≀ b β€’ q := by simp_rw [le_def] intro x exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b) #align seminorm.smul_le_smul Seminorm.smul_le_smul theorem finset_sup_apply (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = ↑(s.sup fun i => ⟨p i x, map_nonneg (p i) x⟩ : ℝβ‰₯0) := by induction' s using Finset.cons_induction_on with a s ha ih Β· rw [Finset.sup_empty, Finset.sup_empty, coe_bot, _root_.bot_eq_zero, Pi.zero_apply] norm_cast Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max, NNReal.coe_max, NNReal.coe_mk, ih] #align seminorm.finset_sup_apply Seminorm.finset_sup_apply theorem exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) : βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.exists_mem_eq_sup s hs (fun i ↦ (⟨p i x, map_nonneg _ _⟩ : ℝβ‰₯0)) with ⟨i, hi, hix⟩ rw [finset_sup_apply] exact ⟨i, hi, congr_arg _ hix⟩ theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = 0 ∨ βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.eq_empty_or_nonempty s with (rfl|hs) Β· left; rfl Β· right; exact exists_apply_eq_finset_sup p hs x theorem finset_sup_smul (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (C : ℝβ‰₯0) : s.sup (C β€’ p) = C β€’ s.sup p := by ext x rw [smul_apply, finset_sup_apply, finset_sup_apply] symm exact congr_arg ((↑) : ℝβ‰₯0 β†’ ℝ) (NNReal.mul_finset_sup C s (fun i ↦ ⟨p i x, map_nonneg _ _⟩)) theorem finset_sup_le_sum (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) : s.sup p ≀ βˆ‘ i in s, p i := by classical refine' Finset.sup_le_iff.mpr _ intro i hi rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left] exact bot_le #align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum theorem finset_sup_apply_le {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 ≀ a) (h : βˆ€ i, i ∈ s β†’ p i x ≀ a) : s.sup p x ≀ a := by lift a to ℝβ‰₯0 using ha rw [finset_sup_apply, NNReal.coe_le_coe] exact Finset.sup_le h #align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le theorem le_finset_sup_apply {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {i : ΞΉ} (hi : i ∈ s) : p i x ≀ s.sup p x := (Finset.le_sup hi : p i ≀ s.sup p) x theorem finset_sup_apply_lt {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 < a) (h : βˆ€ i, i ∈ s β†’ p i x < a) : s.sup p x < a := by lift a to ℝβ‰₯0 using ha.le rw [finset_sup_apply, NNReal.coe_lt_coe, Finset.sup_lt_iff] Β· exact h Β· exact NNReal.coe_pos.mpr ha #align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt theorem norm_sub_map_le_sub (p : Seminorm π•œ E) (x y : E) : β€–p x - p yβ€– ≀ p (x - y) := abs_sub_map_le_sub p x y #align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub end Module end SeminormedRing section SeminormedCommRing variable [SeminormedRing π•œ] [SeminormedCommRing π•œβ‚‚] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] theorem comp_smul (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) : p.comp (c β€’ f) = β€–cβ€–β‚Š β€’ p.comp f := ext fun _ => by rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm, smul_eq_mul, comp_apply] #align seminorm.comp_smul Seminorm.comp_smul theorem comp_smul_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) (x : E) : p.comp (c β€’ f) x = β€–cβ€– * p (f x) := map_smul_eq_mul p _ _ #align seminorm.comp_smul_apply Seminorm.comp_smul_apply end SeminormedCommRing section NormedField variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] {p q : Seminorm π•œ E} {x : E} /-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/ theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) := ⟨0, by rintro _ ⟨x, rfl⟩ dsimp;
positivity
/-- 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;
Mathlib.Analysis.Seminorm.482_0.ywwMCgoKeIFKDZ3
/-- 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))
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 x : E p q : Seminorm π•œ E src✝ : AddGroupSeminorm E := p.toAddGroupSeminorm βŠ“ q.toAddGroupSeminorm ⊒ βˆ€ (a : π•œ) (x : E), AddGroupSeminorm.toFun { toFun := fun x => β¨… u, p u + q (x - u), map_zero' := (_ : AddGroupSeminorm.toFun src✝ 0 = 0), add_le' := (_ : βˆ€ (r s : E), AddGroupSeminorm.toFun src✝ (r + s) ≀ AddGroupSeminorm.toFun src✝ r + AddGroupSeminorm.toFun src✝ s), neg' := (_ : βˆ€ (r : E), AddGroupSeminorm.toFun src✝ (-r) = AddGroupSeminorm.toFun src✝ r) } (a β€’ x) = β€–aβ€– * AddGroupSeminorm.toFun { toFun := fun x => β¨… u, p u + q (x - u), map_zero' := (_ : AddGroupSeminorm.toFun src✝ 0 = 0), add_le' := (_ : βˆ€ (r s : E), AddGroupSeminorm.toFun src✝ (r + s) ≀ AddGroupSeminorm.toFun src✝ r + AddGroupSeminorm.toFun src✝ s), neg' := (_ : βˆ€ (r : E), AddGroupSeminorm.toFun src✝ (-r) = AddGroupSeminorm.toFun src✝ r) } x
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, YaΓ«l Dillies, Moritz Doll -/ import Mathlib.Data.Real.Pointwise import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.LocallyConvex.Basic import Mathlib.Analysis.Normed.Group.AddTorsor #align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c" /-! # Seminorms This file defines seminorms. A seminorm is a function to the reals which is positive-semidefinite, absolutely homogeneous, and subadditive. They are closely related to convex sets, and a topological vector space is locally convex if and only if its topology is induced by a family of seminorms. ## Main declarations For a module over a normed ring: * `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and subadditive. * `normSeminorm π•œ E`: The norm on `E` as a seminorm. ## References * [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966] ## Tags seminorm, locally convex, LCTVS -/ set_option autoImplicit true open NormedField Set Filter open scoped BigOperators NNReal Pointwise Topology Uniformity variable {R R' π•œ π•œβ‚‚ π•œβ‚ƒ 𝕝 E Eβ‚‚ E₃ F G ΞΉ : Type*} /-- A seminorm on a module over a normed ring is a function to the reals that is positive semidefinite, positive homogeneous, and subadditive. -/ structure Seminorm (π•œ : Type*) (E : Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminorm E where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ smul' : βˆ€ (a : π•œ) (x : E), toFun (a β€’ x) = β€–aβ€– * toFun x #align seminorm Seminorm attribute [nolint docBlame] Seminorm.toAddGroupSeminorm /-- `SeminormClass F π•œ E` states that `F` is a type of seminorms on the `π•œ`-module `E`. You should extend this class when you extend `Seminorm`. -/ class SeminormClass (F : Type*) (π•œ E : outParam <| Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminormClass F E ℝ where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ map_smul_eq_mul (f : F) (a : π•œ) (x : E) : f (a β€’ x) = β€–aβ€– * f x #align seminorm_class SeminormClass export SeminormClass (map_smul_eq_mul) -- Porting note: dangerous instances no longer exist -- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass section Of /-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a `SeminormedRing π•œ`. -/ def Seminorm.of [SeminormedRing π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (add_le : βˆ€ x y : E, f (x + y) ≀ f x + f y) (smul : βˆ€ (a : π•œ) (x : E), f (a β€’ x) = β€–aβ€– * f x) : Seminorm π•œ E where toFun := f map_zero' := by rw [← zero_smul π•œ (0 : E), smul, norm_zero, zero_mul] add_le' := add_le smul' := smul neg' x := by rw [← neg_one_smul π•œ, smul, norm_neg, ← smul, one_smul] #align seminorm.of Seminorm.of /-- Alternative constructor for a `Seminorm` over a normed field `π•œ` that only assumes `f 0 = 0` and an inequality for the scalar multiplication. -/ def Seminorm.ofSMulLE [NormedField π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (map_zero : f 0 = 0) (add_le : βˆ€ x y, f (x + y) ≀ f x + f y) (smul_le : βˆ€ (r : π•œ) (x), f (r β€’ x) ≀ β€–rβ€– * f x) : Seminorm π•œ E := Seminorm.of f add_le fun r x => by refine' le_antisymm (smul_le r x) _ by_cases h : r = 0 Β· simp [h, map_zero] rw [← mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))] rw [inv_mul_cancel_leftβ‚€ (norm_ne_zero_iff.mpr h)] specialize smul_le r⁻¹ (r β€’ x) rw [norm_inv] at smul_le convert smul_le simp [h] #align seminorm.of_smul_le Seminorm.ofSMulLE end Of namespace Seminorm section SeminormedRing variable [SeminormedRing π•œ] section AddGroup variable [AddGroup E] section SMul variable [SMul π•œ E] instance instSeminormClass : SeminormClass (Seminorm π•œ E) π•œ E where coe f := f.toFun coe_injective' f g h := by rcases f with ⟨⟨_⟩⟩ rcases g with ⟨⟨_⟩⟩ congr map_zero f := f.map_zero' map_add_le_add f := f.add_le' map_neg_eq_map f := f.neg' map_smul_eq_mul f := f.smul' #align seminorm.seminorm_class Seminorm.instSeminormClass /-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/ instance instCoeFun : CoeFun (Seminorm π•œ E) fun _ => E β†’ ℝ := FunLike.hasCoeToFun @[ext] theorem ext {p q : Seminorm π•œ E} (h : βˆ€ x, (p : E β†’ ℝ) x = q x) : p = q := FunLike.ext p q h #align seminorm.ext Seminorm.ext instance instZero : Zero (Seminorm π•œ E) := ⟨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with smul' := fun _ _ => (mul_zero _).symm }⟩ @[simp] theorem coe_zero : ⇑(0 : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_zero Seminorm.coe_zero @[simp] theorem zero_apply (x : E) : (0 : Seminorm π•œ E) x = 0 := rfl #align seminorm.zero_apply Seminorm.zero_apply instance : Inhabited (Seminorm π•œ E) := ⟨0⟩ variable (p : Seminorm π•œ E) (c : π•œ) (x y : E) (r : ℝ) /-- Any action on `ℝ` which factors through `ℝβ‰₯0` applies to a seminorm. -/ instance instSMul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : SMul R (Seminorm π•œ E) where smul r p := { r β€’ p.toAddGroupSeminorm with toFun := fun x => r β€’ p x smul' := fun _ _ => by simp only [← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul] rw [map_smul_eq_mul, mul_left_comm] } instance [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] [SMul R' ℝ] [SMul R' ℝβ‰₯0] [IsScalarTower R' ℝβ‰₯0 ℝ] [SMul R R'] [IsScalarTower R R' ℝ] : IsScalarTower R R' (Seminorm π•œ E) where smul_assoc r a p := ext fun x => smul_assoc r a (p x) theorem coe_smul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) : ⇑(r β€’ p) = r β€’ ⇑p := rfl #align seminorm.coe_smul Seminorm.coe_smul @[simp] theorem smul_apply [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) (x : E) : (r β€’ p) x = r β€’ p x := rfl #align seminorm.smul_apply Seminorm.smul_apply instance instAdd : Add (Seminorm π•œ E) where add p q := { p.toAddGroupSeminorm + q.toAddGroupSeminorm with toFun := fun x => p x + q x smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] } theorem coe_add (p q : Seminorm π•œ E) : ⇑(p + q) = p + q := rfl #align seminorm.coe_add Seminorm.coe_add @[simp] theorem add_apply (p q : Seminorm π•œ E) (x : E) : (p + q) x = p x + q x := rfl #align seminorm.add_apply Seminorm.add_apply instance instAddMonoid : AddMonoid (Seminorm π•œ E) := FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π•œ E) := FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl instance instMulAction [Monoid R] [MulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : MulAction R (Seminorm π•œ E) := FunLike.coe_injective.mulAction _ (by intros; rfl) variable (π•œ E) /-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π•œ E` is a module. -/ @[simps] def coeFnAddMonoidHom : AddMonoidHom (Seminorm π•œ E) (E β†’ ℝ) where toFun := (↑) map_zero' := coe_zero map_add' := coe_add #align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π•œ E) := show @Function.Injective (Seminorm π•œ E) (E β†’ ℝ) (↑) from FunLike.coe_injective #align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective variable {π•œ E} instance instDistribMulAction [Monoid R] [DistribMulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : DistribMulAction R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).distribMulAction _ (by intros; rfl) instance instModule [Semiring R] [Module R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : Module R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).module R _ (by intros; rfl) instance instSup : Sup (Seminorm π•œ E) where sup p q := { p.toAddGroupSeminorm βŠ” q.toAddGroupSeminorm with toFun := p βŠ” q smul' := fun x v => (congr_argβ‚‚ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <| (mul_max_of_nonneg _ _ <| norm_nonneg x).symm } @[simp] theorem coe_sup (p q : Seminorm π•œ E) : ⇑(p βŠ” q) = (p : E β†’ ℝ) βŠ” (q : E β†’ ℝ) := rfl #align seminorm.coe_sup Seminorm.coe_sup theorem sup_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ” q) x = p x βŠ” q x := rfl #align seminorm.sup_apply Seminorm.sup_apply theorem smul_sup [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ” q) = r β€’ p βŠ” r β€’ q := have real.smul_max : βˆ€ x y : ℝ, r β€’ max x y = max (r β€’ x) (r β€’ y) := fun x y => by simpa only [← smul_eq_mul, ← NNReal.smul_def, smul_one_smul ℝβ‰₯0 r (_ : ℝ)] using mul_max_of_nonneg x y (r β€’ (1 : ℝβ‰₯0) : ℝβ‰₯0).coe_nonneg ext fun x => real.smul_max _ _ #align seminorm.smul_sup Seminorm.smul_sup instance instPartialOrder : PartialOrder (Seminorm π•œ E) := PartialOrder.lift _ FunLike.coe_injective @[simp, norm_cast] theorem coe_le_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) ≀ q ↔ p ≀ q := Iff.rfl #align seminorm.coe_le_coe Seminorm.coe_le_coe @[simp, norm_cast] theorem coe_lt_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) < q ↔ p < q := Iff.rfl #align seminorm.coe_lt_coe Seminorm.coe_lt_coe theorem le_def {p q : Seminorm π•œ E} : p ≀ q ↔ βˆ€ x, p x ≀ q x := Iff.rfl #align seminorm.le_def Seminorm.le_def theorem lt_def {p q : Seminorm π•œ E} : p < q ↔ p ≀ q ∧ βˆƒ x, p x < q x := @Pi.lt_def _ _ _ p q #align seminorm.lt_def Seminorm.lt_def instance instSemilatticeSup : SemilatticeSup (Seminorm π•œ E) := Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup end SMul end AddGroup section Module variable [SeminormedRing π•œβ‚‚] [SeminormedRing π•œβ‚ƒ] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable {σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₂₃] variable {σ₁₃ : π•œ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₁₃] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [AddCommGroup E₃] variable [AddCommGroup F] [AddCommGroup G] variable [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] [Module π•œβ‚ƒ E₃] [Module π•œ F] [Module π•œ G] -- Porting note: even though this instance is found immediately by typeclass search, -- it seems to be needed below!? noncomputable instance smul_nnreal_real : SMul ℝβ‰₯0 ℝ := inferInstance variable [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] /-- Composition of a seminorm with a linear map is a seminorm. -/ def comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œ E := { p.toAddGroupSeminorm.comp f.toAddMonoidHom with toFun := fun x => p (f x) -- Porting note: the `simp only` below used to be part of the `rw`. -- I'm not sure why this change was needed, and am worried by it! smul' := fun _ _ => by simp only [map_smulβ‚›β‚—]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] } #align seminorm.comp Seminorm.comp theorem coe_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : ⇑(p.comp f) = p ∘ f := rfl #align seminorm.coe_comp Seminorm.coe_comp @[simp] theorem comp_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (x : E) : (p.comp f) x = p (f x) := rfl #align seminorm.comp_apply Seminorm.comp_apply @[simp] theorem comp_id (p : Seminorm π•œ E) : p.comp LinearMap.id = p := ext fun _ => rfl #align seminorm.comp_id Seminorm.comp_id @[simp] theorem comp_zero (p : Seminorm π•œβ‚‚ Eβ‚‚) : p.comp (0 : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) = 0 := ext fun _ => map_zero p #align seminorm.comp_zero Seminorm.comp_zero @[simp] theorem zero_comp (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (0 : Seminorm π•œβ‚‚ Eβ‚‚).comp f = 0 := ext fun _ => rfl #align seminorm.zero_comp Seminorm.zero_comp theorem comp_comp [RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] (p : Seminorm π•œβ‚ƒ E₃) (g : Eβ‚‚ β†’β‚›β‚—[σ₂₃] E₃) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (g.comp f) = (p.comp g).comp f := ext fun _ => rfl #align seminorm.comp_comp Seminorm.comp_comp theorem add_comp (p q : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (p + q).comp f = p.comp f + q.comp f := ext fun _ => rfl #align seminorm.add_comp Seminorm.add_comp theorem comp_add_le (p : Seminorm π•œβ‚‚ Eβ‚‚) (f g : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (f + g) ≀ p.comp f + p.comp g := fun _ => map_add_le_add p _ _ #align seminorm.comp_add_le Seminorm.comp_add_le theorem smul_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : R) : (c β€’ p).comp f = c β€’ p.comp f := ext fun _ => rfl #align seminorm.smul_comp Seminorm.smul_comp theorem comp_mono {p q : Seminorm π•œβ‚‚ Eβ‚‚} (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (hp : p ≀ q) : p.comp f ≀ q.comp f := fun _ => hp _ #align seminorm.comp_mono Seminorm.comp_mono /-- The composition as an `AddMonoidHom`. -/ @[simps] def pullback (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œβ‚‚ Eβ‚‚ β†’+ Seminorm π•œ E where toFun := fun p => p.comp f map_zero' := zero_comp f map_add' := fun p q => add_comp p q f #align seminorm.pullback Seminorm.pullback instance instOrderBot : OrderBot (Seminorm π•œ E) where bot := 0 bot_le := map_nonneg @[simp] theorem coe_bot : ⇑(βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_bot Seminorm.coe_bot theorem bot_eq_zero : (βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.bot_eq_zero Seminorm.bot_eq_zero theorem smul_le_smul {p q : Seminorm π•œ E} {a b : ℝβ‰₯0} (hpq : p ≀ q) (hab : a ≀ b) : a β€’ p ≀ b β€’ q := by simp_rw [le_def] intro x exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b) #align seminorm.smul_le_smul Seminorm.smul_le_smul theorem finset_sup_apply (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = ↑(s.sup fun i => ⟨p i x, map_nonneg (p i) x⟩ : ℝβ‰₯0) := by induction' s using Finset.cons_induction_on with a s ha ih Β· rw [Finset.sup_empty, Finset.sup_empty, coe_bot, _root_.bot_eq_zero, Pi.zero_apply] norm_cast Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max, NNReal.coe_max, NNReal.coe_mk, ih] #align seminorm.finset_sup_apply Seminorm.finset_sup_apply theorem exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) : βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.exists_mem_eq_sup s hs (fun i ↦ (⟨p i x, map_nonneg _ _⟩ : ℝβ‰₯0)) with ⟨i, hi, hix⟩ rw [finset_sup_apply] exact ⟨i, hi, congr_arg _ hix⟩ theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = 0 ∨ βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.eq_empty_or_nonempty s with (rfl|hs) Β· left; rfl Β· right; exact exists_apply_eq_finset_sup p hs x theorem finset_sup_smul (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (C : ℝβ‰₯0) : s.sup (C β€’ p) = C β€’ s.sup p := by ext x rw [smul_apply, finset_sup_apply, finset_sup_apply] symm exact congr_arg ((↑) : ℝβ‰₯0 β†’ ℝ) (NNReal.mul_finset_sup C s (fun i ↦ ⟨p i x, map_nonneg _ _⟩)) theorem finset_sup_le_sum (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) : s.sup p ≀ βˆ‘ i in s, p i := by classical refine' Finset.sup_le_iff.mpr _ intro i hi rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left] exact bot_le #align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum theorem finset_sup_apply_le {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 ≀ a) (h : βˆ€ i, i ∈ s β†’ p i x ≀ a) : s.sup p x ≀ a := by lift a to ℝβ‰₯0 using ha rw [finset_sup_apply, NNReal.coe_le_coe] exact Finset.sup_le h #align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le theorem le_finset_sup_apply {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {i : ΞΉ} (hi : i ∈ s) : p i x ≀ s.sup p x := (Finset.le_sup hi : p i ≀ s.sup p) x theorem finset_sup_apply_lt {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 < a) (h : βˆ€ i, i ∈ s β†’ p i x < a) : s.sup p x < a := by lift a to ℝβ‰₯0 using ha.le rw [finset_sup_apply, NNReal.coe_lt_coe, Finset.sup_lt_iff] Β· exact h Β· exact NNReal.coe_pos.mpr ha #align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt theorem norm_sub_map_le_sub (p : Seminorm π•œ E) (x y : E) : β€–p x - p yβ€– ≀ p (x - y) := abs_sub_map_le_sub p x y #align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub end Module end SeminormedRing section SeminormedCommRing variable [SeminormedRing π•œ] [SeminormedCommRing π•œβ‚‚] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] theorem comp_smul (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) : p.comp (c β€’ f) = β€–cβ€–β‚Š β€’ p.comp f := ext fun _ => by rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm, smul_eq_mul, comp_apply] #align seminorm.comp_smul Seminorm.comp_smul theorem comp_smul_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) (x : E) : p.comp (c β€’ f) x = β€–cβ€– * p (f x) := map_smul_eq_mul p _ _ #align seminorm.comp_smul_apply Seminorm.comp_smul_apply end SeminormedCommRing section NormedField variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] {p q : Seminorm π•œ E} {x : E} /-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/ theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) := ⟨0, by rintro _ ⟨x, rfl⟩ dsimp; positivity⟩ #align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add noncomputable instance instInf : Inf (Seminorm π•œ E) where inf p q := { p.toAddGroupSeminorm βŠ“ q.toAddGroupSeminorm with toFun := fun x => β¨… u : E, p u + q (x - u) smul' := by
intro a x
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
Mathlib.Analysis.Seminorm.489_0.ywwMCgoKeIFKDZ3
noncomputable instance instInf : Inf (Seminorm π•œ E) where inf p q
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 x✝ : E p q : Seminorm π•œ E src✝ : AddGroupSeminorm E := p.toAddGroupSeminorm βŠ“ q.toAddGroupSeminorm a : π•œ x : E ⊒ AddGroupSeminorm.toFun { toFun := fun x => β¨… u, p u + q (x - u), map_zero' := (_ : AddGroupSeminorm.toFun src✝ 0 = 0), add_le' := (_ : βˆ€ (r s : E), AddGroupSeminorm.toFun src✝ (r + s) ≀ AddGroupSeminorm.toFun src✝ r + AddGroupSeminorm.toFun src✝ s), neg' := (_ : βˆ€ (r : E), AddGroupSeminorm.toFun src✝ (-r) = AddGroupSeminorm.toFun src✝ r) } (a β€’ x) = β€–aβ€– * AddGroupSeminorm.toFun { toFun := fun x => β¨… u, p u + q (x - u), map_zero' := (_ : AddGroupSeminorm.toFun src✝ 0 = 0), add_le' := (_ : βˆ€ (r s : E), AddGroupSeminorm.toFun src✝ (r + s) ≀ AddGroupSeminorm.toFun src✝ r + AddGroupSeminorm.toFun src✝ s), neg' := (_ : βˆ€ (r : E), AddGroupSeminorm.toFun src✝ (-r) = AddGroupSeminorm.toFun src✝ r) } x
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, YaΓ«l Dillies, Moritz Doll -/ import Mathlib.Data.Real.Pointwise import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.LocallyConvex.Basic import Mathlib.Analysis.Normed.Group.AddTorsor #align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c" /-! # Seminorms This file defines seminorms. A seminorm is a function to the reals which is positive-semidefinite, absolutely homogeneous, and subadditive. They are closely related to convex sets, and a topological vector space is locally convex if and only if its topology is induced by a family of seminorms. ## Main declarations For a module over a normed ring: * `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and subadditive. * `normSeminorm π•œ E`: The norm on `E` as a seminorm. ## References * [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966] ## Tags seminorm, locally convex, LCTVS -/ set_option autoImplicit true open NormedField Set Filter open scoped BigOperators NNReal Pointwise Topology Uniformity variable {R R' π•œ π•œβ‚‚ π•œβ‚ƒ 𝕝 E Eβ‚‚ E₃ F G ΞΉ : Type*} /-- A seminorm on a module over a normed ring is a function to the reals that is positive semidefinite, positive homogeneous, and subadditive. -/ structure Seminorm (π•œ : Type*) (E : Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminorm E where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ smul' : βˆ€ (a : π•œ) (x : E), toFun (a β€’ x) = β€–aβ€– * toFun x #align seminorm Seminorm attribute [nolint docBlame] Seminorm.toAddGroupSeminorm /-- `SeminormClass F π•œ E` states that `F` is a type of seminorms on the `π•œ`-module `E`. You should extend this class when you extend `Seminorm`. -/ class SeminormClass (F : Type*) (π•œ E : outParam <| Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminormClass F E ℝ where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ map_smul_eq_mul (f : F) (a : π•œ) (x : E) : f (a β€’ x) = β€–aβ€– * f x #align seminorm_class SeminormClass export SeminormClass (map_smul_eq_mul) -- Porting note: dangerous instances no longer exist -- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass section Of /-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a `SeminormedRing π•œ`. -/ def Seminorm.of [SeminormedRing π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (add_le : βˆ€ x y : E, f (x + y) ≀ f x + f y) (smul : βˆ€ (a : π•œ) (x : E), f (a β€’ x) = β€–aβ€– * f x) : Seminorm π•œ E where toFun := f map_zero' := by rw [← zero_smul π•œ (0 : E), smul, norm_zero, zero_mul] add_le' := add_le smul' := smul neg' x := by rw [← neg_one_smul π•œ, smul, norm_neg, ← smul, one_smul] #align seminorm.of Seminorm.of /-- Alternative constructor for a `Seminorm` over a normed field `π•œ` that only assumes `f 0 = 0` and an inequality for the scalar multiplication. -/ def Seminorm.ofSMulLE [NormedField π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (map_zero : f 0 = 0) (add_le : βˆ€ x y, f (x + y) ≀ f x + f y) (smul_le : βˆ€ (r : π•œ) (x), f (r β€’ x) ≀ β€–rβ€– * f x) : Seminorm π•œ E := Seminorm.of f add_le fun r x => by refine' le_antisymm (smul_le r x) _ by_cases h : r = 0 Β· simp [h, map_zero] rw [← mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))] rw [inv_mul_cancel_leftβ‚€ (norm_ne_zero_iff.mpr h)] specialize smul_le r⁻¹ (r β€’ x) rw [norm_inv] at smul_le convert smul_le simp [h] #align seminorm.of_smul_le Seminorm.ofSMulLE end Of namespace Seminorm section SeminormedRing variable [SeminormedRing π•œ] section AddGroup variable [AddGroup E] section SMul variable [SMul π•œ E] instance instSeminormClass : SeminormClass (Seminorm π•œ E) π•œ E where coe f := f.toFun coe_injective' f g h := by rcases f with ⟨⟨_⟩⟩ rcases g with ⟨⟨_⟩⟩ congr map_zero f := f.map_zero' map_add_le_add f := f.add_le' map_neg_eq_map f := f.neg' map_smul_eq_mul f := f.smul' #align seminorm.seminorm_class Seminorm.instSeminormClass /-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/ instance instCoeFun : CoeFun (Seminorm π•œ E) fun _ => E β†’ ℝ := FunLike.hasCoeToFun @[ext] theorem ext {p q : Seminorm π•œ E} (h : βˆ€ x, (p : E β†’ ℝ) x = q x) : p = q := FunLike.ext p q h #align seminorm.ext Seminorm.ext instance instZero : Zero (Seminorm π•œ E) := ⟨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with smul' := fun _ _ => (mul_zero _).symm }⟩ @[simp] theorem coe_zero : ⇑(0 : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_zero Seminorm.coe_zero @[simp] theorem zero_apply (x : E) : (0 : Seminorm π•œ E) x = 0 := rfl #align seminorm.zero_apply Seminorm.zero_apply instance : Inhabited (Seminorm π•œ E) := ⟨0⟩ variable (p : Seminorm π•œ E) (c : π•œ) (x y : E) (r : ℝ) /-- Any action on `ℝ` which factors through `ℝβ‰₯0` applies to a seminorm. -/ instance instSMul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : SMul R (Seminorm π•œ E) where smul r p := { r β€’ p.toAddGroupSeminorm with toFun := fun x => r β€’ p x smul' := fun _ _ => by simp only [← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul] rw [map_smul_eq_mul, mul_left_comm] } instance [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] [SMul R' ℝ] [SMul R' ℝβ‰₯0] [IsScalarTower R' ℝβ‰₯0 ℝ] [SMul R R'] [IsScalarTower R R' ℝ] : IsScalarTower R R' (Seminorm π•œ E) where smul_assoc r a p := ext fun x => smul_assoc r a (p x) theorem coe_smul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) : ⇑(r β€’ p) = r β€’ ⇑p := rfl #align seminorm.coe_smul Seminorm.coe_smul @[simp] theorem smul_apply [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) (x : E) : (r β€’ p) x = r β€’ p x := rfl #align seminorm.smul_apply Seminorm.smul_apply instance instAdd : Add (Seminorm π•œ E) where add p q := { p.toAddGroupSeminorm + q.toAddGroupSeminorm with toFun := fun x => p x + q x smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] } theorem coe_add (p q : Seminorm π•œ E) : ⇑(p + q) = p + q := rfl #align seminorm.coe_add Seminorm.coe_add @[simp] theorem add_apply (p q : Seminorm π•œ E) (x : E) : (p + q) x = p x + q x := rfl #align seminorm.add_apply Seminorm.add_apply instance instAddMonoid : AddMonoid (Seminorm π•œ E) := FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π•œ E) := FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl instance instMulAction [Monoid R] [MulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : MulAction R (Seminorm π•œ E) := FunLike.coe_injective.mulAction _ (by intros; rfl) variable (π•œ E) /-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π•œ E` is a module. -/ @[simps] def coeFnAddMonoidHom : AddMonoidHom (Seminorm π•œ E) (E β†’ ℝ) where toFun := (↑) map_zero' := coe_zero map_add' := coe_add #align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π•œ E) := show @Function.Injective (Seminorm π•œ E) (E β†’ ℝ) (↑) from FunLike.coe_injective #align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective variable {π•œ E} instance instDistribMulAction [Monoid R] [DistribMulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : DistribMulAction R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).distribMulAction _ (by intros; rfl) instance instModule [Semiring R] [Module R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : Module R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).module R _ (by intros; rfl) instance instSup : Sup (Seminorm π•œ E) where sup p q := { p.toAddGroupSeminorm βŠ” q.toAddGroupSeminorm with toFun := p βŠ” q smul' := fun x v => (congr_argβ‚‚ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <| (mul_max_of_nonneg _ _ <| norm_nonneg x).symm } @[simp] theorem coe_sup (p q : Seminorm π•œ E) : ⇑(p βŠ” q) = (p : E β†’ ℝ) βŠ” (q : E β†’ ℝ) := rfl #align seminorm.coe_sup Seminorm.coe_sup theorem sup_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ” q) x = p x βŠ” q x := rfl #align seminorm.sup_apply Seminorm.sup_apply theorem smul_sup [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ” q) = r β€’ p βŠ” r β€’ q := have real.smul_max : βˆ€ x y : ℝ, r β€’ max x y = max (r β€’ x) (r β€’ y) := fun x y => by simpa only [← smul_eq_mul, ← NNReal.smul_def, smul_one_smul ℝβ‰₯0 r (_ : ℝ)] using mul_max_of_nonneg x y (r β€’ (1 : ℝβ‰₯0) : ℝβ‰₯0).coe_nonneg ext fun x => real.smul_max _ _ #align seminorm.smul_sup Seminorm.smul_sup instance instPartialOrder : PartialOrder (Seminorm π•œ E) := PartialOrder.lift _ FunLike.coe_injective @[simp, norm_cast] theorem coe_le_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) ≀ q ↔ p ≀ q := Iff.rfl #align seminorm.coe_le_coe Seminorm.coe_le_coe @[simp, norm_cast] theorem coe_lt_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) < q ↔ p < q := Iff.rfl #align seminorm.coe_lt_coe Seminorm.coe_lt_coe theorem le_def {p q : Seminorm π•œ E} : p ≀ q ↔ βˆ€ x, p x ≀ q x := Iff.rfl #align seminorm.le_def Seminorm.le_def theorem lt_def {p q : Seminorm π•œ E} : p < q ↔ p ≀ q ∧ βˆƒ x, p x < q x := @Pi.lt_def _ _ _ p q #align seminorm.lt_def Seminorm.lt_def instance instSemilatticeSup : SemilatticeSup (Seminorm π•œ E) := Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup end SMul end AddGroup section Module variable [SeminormedRing π•œβ‚‚] [SeminormedRing π•œβ‚ƒ] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable {σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₂₃] variable {σ₁₃ : π•œ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₁₃] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [AddCommGroup E₃] variable [AddCommGroup F] [AddCommGroup G] variable [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] [Module π•œβ‚ƒ E₃] [Module π•œ F] [Module π•œ G] -- Porting note: even though this instance is found immediately by typeclass search, -- it seems to be needed below!? noncomputable instance smul_nnreal_real : SMul ℝβ‰₯0 ℝ := inferInstance variable [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] /-- Composition of a seminorm with a linear map is a seminorm. -/ def comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œ E := { p.toAddGroupSeminorm.comp f.toAddMonoidHom with toFun := fun x => p (f x) -- Porting note: the `simp only` below used to be part of the `rw`. -- I'm not sure why this change was needed, and am worried by it! smul' := fun _ _ => by simp only [map_smulβ‚›β‚—]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] } #align seminorm.comp Seminorm.comp theorem coe_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : ⇑(p.comp f) = p ∘ f := rfl #align seminorm.coe_comp Seminorm.coe_comp @[simp] theorem comp_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (x : E) : (p.comp f) x = p (f x) := rfl #align seminorm.comp_apply Seminorm.comp_apply @[simp] theorem comp_id (p : Seminorm π•œ E) : p.comp LinearMap.id = p := ext fun _ => rfl #align seminorm.comp_id Seminorm.comp_id @[simp] theorem comp_zero (p : Seminorm π•œβ‚‚ Eβ‚‚) : p.comp (0 : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) = 0 := ext fun _ => map_zero p #align seminorm.comp_zero Seminorm.comp_zero @[simp] theorem zero_comp (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (0 : Seminorm π•œβ‚‚ Eβ‚‚).comp f = 0 := ext fun _ => rfl #align seminorm.zero_comp Seminorm.zero_comp theorem comp_comp [RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] (p : Seminorm π•œβ‚ƒ E₃) (g : Eβ‚‚ β†’β‚›β‚—[σ₂₃] E₃) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (g.comp f) = (p.comp g).comp f := ext fun _ => rfl #align seminorm.comp_comp Seminorm.comp_comp theorem add_comp (p q : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (p + q).comp f = p.comp f + q.comp f := ext fun _ => rfl #align seminorm.add_comp Seminorm.add_comp theorem comp_add_le (p : Seminorm π•œβ‚‚ Eβ‚‚) (f g : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (f + g) ≀ p.comp f + p.comp g := fun _ => map_add_le_add p _ _ #align seminorm.comp_add_le Seminorm.comp_add_le theorem smul_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : R) : (c β€’ p).comp f = c β€’ p.comp f := ext fun _ => rfl #align seminorm.smul_comp Seminorm.smul_comp theorem comp_mono {p q : Seminorm π•œβ‚‚ Eβ‚‚} (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (hp : p ≀ q) : p.comp f ≀ q.comp f := fun _ => hp _ #align seminorm.comp_mono Seminorm.comp_mono /-- The composition as an `AddMonoidHom`. -/ @[simps] def pullback (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œβ‚‚ Eβ‚‚ β†’+ Seminorm π•œ E where toFun := fun p => p.comp f map_zero' := zero_comp f map_add' := fun p q => add_comp p q f #align seminorm.pullback Seminorm.pullback instance instOrderBot : OrderBot (Seminorm π•œ E) where bot := 0 bot_le := map_nonneg @[simp] theorem coe_bot : ⇑(βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_bot Seminorm.coe_bot theorem bot_eq_zero : (βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.bot_eq_zero Seminorm.bot_eq_zero theorem smul_le_smul {p q : Seminorm π•œ E} {a b : ℝβ‰₯0} (hpq : p ≀ q) (hab : a ≀ b) : a β€’ p ≀ b β€’ q := by simp_rw [le_def] intro x exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b) #align seminorm.smul_le_smul Seminorm.smul_le_smul theorem finset_sup_apply (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = ↑(s.sup fun i => ⟨p i x, map_nonneg (p i) x⟩ : ℝβ‰₯0) := by induction' s using Finset.cons_induction_on with a s ha ih Β· rw [Finset.sup_empty, Finset.sup_empty, coe_bot, _root_.bot_eq_zero, Pi.zero_apply] norm_cast Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max, NNReal.coe_max, NNReal.coe_mk, ih] #align seminorm.finset_sup_apply Seminorm.finset_sup_apply theorem exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) : βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.exists_mem_eq_sup s hs (fun i ↦ (⟨p i x, map_nonneg _ _⟩ : ℝβ‰₯0)) with ⟨i, hi, hix⟩ rw [finset_sup_apply] exact ⟨i, hi, congr_arg _ hix⟩ theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = 0 ∨ βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.eq_empty_or_nonempty s with (rfl|hs) Β· left; rfl Β· right; exact exists_apply_eq_finset_sup p hs x theorem finset_sup_smul (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (C : ℝβ‰₯0) : s.sup (C β€’ p) = C β€’ s.sup p := by ext x rw [smul_apply, finset_sup_apply, finset_sup_apply] symm exact congr_arg ((↑) : ℝβ‰₯0 β†’ ℝ) (NNReal.mul_finset_sup C s (fun i ↦ ⟨p i x, map_nonneg _ _⟩)) theorem finset_sup_le_sum (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) : s.sup p ≀ βˆ‘ i in s, p i := by classical refine' Finset.sup_le_iff.mpr _ intro i hi rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left] exact bot_le #align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum theorem finset_sup_apply_le {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 ≀ a) (h : βˆ€ i, i ∈ s β†’ p i x ≀ a) : s.sup p x ≀ a := by lift a to ℝβ‰₯0 using ha rw [finset_sup_apply, NNReal.coe_le_coe] exact Finset.sup_le h #align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le theorem le_finset_sup_apply {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {i : ΞΉ} (hi : i ∈ s) : p i x ≀ s.sup p x := (Finset.le_sup hi : p i ≀ s.sup p) x theorem finset_sup_apply_lt {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 < a) (h : βˆ€ i, i ∈ s β†’ p i x < a) : s.sup p x < a := by lift a to ℝβ‰₯0 using ha.le rw [finset_sup_apply, NNReal.coe_lt_coe, Finset.sup_lt_iff] Β· exact h Β· exact NNReal.coe_pos.mpr ha #align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt theorem norm_sub_map_le_sub (p : Seminorm π•œ E) (x y : E) : β€–p x - p yβ€– ≀ p (x - y) := abs_sub_map_le_sub p x y #align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub end Module end SeminormedRing section SeminormedCommRing variable [SeminormedRing π•œ] [SeminormedCommRing π•œβ‚‚] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] theorem comp_smul (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) : p.comp (c β€’ f) = β€–cβ€–β‚Š β€’ p.comp f := ext fun _ => by rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm, smul_eq_mul, comp_apply] #align seminorm.comp_smul Seminorm.comp_smul theorem comp_smul_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) (x : E) : p.comp (c β€’ f) x = β€–cβ€– * p (f x) := map_smul_eq_mul p _ _ #align seminorm.comp_smul_apply Seminorm.comp_smul_apply end SeminormedCommRing section NormedField variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] {p q : Seminorm π•œ E} {x : E} /-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/ theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) := ⟨0, by rintro _ ⟨x, rfl⟩ dsimp; positivity⟩ #align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add noncomputable instance instInf : Inf (Seminorm π•œ E) where inf p q := { p.toAddGroupSeminorm βŠ“ q.toAddGroupSeminorm with toFun := fun x => β¨… u : E, p u + q (x - u) smul' := by intro a x
obtain rfl | ha := eq_or_ne a 0
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
Mathlib.Analysis.Seminorm.489_0.ywwMCgoKeIFKDZ3
noncomputable instance instInf : Inf (Seminorm π•œ E) where inf p q
Mathlib_Analysis_Seminorm
case inl R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p✝ q✝ : Seminorm π•œ E x✝ : E p q : Seminorm π•œ E src✝ : AddGroupSeminorm E := p.toAddGroupSeminorm βŠ“ q.toAddGroupSeminorm x : E ⊒ AddGroupSeminorm.toFun { toFun := fun x => β¨… u, p u + q (x - u), map_zero' := (_ : AddGroupSeminorm.toFun src✝ 0 = 0), add_le' := (_ : βˆ€ (r s : E), AddGroupSeminorm.toFun src✝ (r + s) ≀ AddGroupSeminorm.toFun src✝ r + AddGroupSeminorm.toFun src✝ s), neg' := (_ : βˆ€ (r : E), AddGroupSeminorm.toFun src✝ (-r) = AddGroupSeminorm.toFun src✝ r) } (0 β€’ x) = β€–0β€– * AddGroupSeminorm.toFun { toFun := fun x => β¨… u, p u + q (x - u), map_zero' := (_ : AddGroupSeminorm.toFun src✝ 0 = 0), add_le' := (_ : βˆ€ (r s : E), AddGroupSeminorm.toFun src✝ (r + s) ≀ AddGroupSeminorm.toFun src✝ r + AddGroupSeminorm.toFun src✝ s), neg' := (_ : βˆ€ (r : E), AddGroupSeminorm.toFun src✝ (-r) = AddGroupSeminorm.toFun src✝ r) } x
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, YaΓ«l Dillies, Moritz Doll -/ import Mathlib.Data.Real.Pointwise import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.LocallyConvex.Basic import Mathlib.Analysis.Normed.Group.AddTorsor #align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c" /-! # Seminorms This file defines seminorms. A seminorm is a function to the reals which is positive-semidefinite, absolutely homogeneous, and subadditive. They are closely related to convex sets, and a topological vector space is locally convex if and only if its topology is induced by a family of seminorms. ## Main declarations For a module over a normed ring: * `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and subadditive. * `normSeminorm π•œ E`: The norm on `E` as a seminorm. ## References * [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966] ## Tags seminorm, locally convex, LCTVS -/ set_option autoImplicit true open NormedField Set Filter open scoped BigOperators NNReal Pointwise Topology Uniformity variable {R R' π•œ π•œβ‚‚ π•œβ‚ƒ 𝕝 E Eβ‚‚ E₃ F G ΞΉ : Type*} /-- A seminorm on a module over a normed ring is a function to the reals that is positive semidefinite, positive homogeneous, and subadditive. -/ structure Seminorm (π•œ : Type*) (E : Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminorm E where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ smul' : βˆ€ (a : π•œ) (x : E), toFun (a β€’ x) = β€–aβ€– * toFun x #align seminorm Seminorm attribute [nolint docBlame] Seminorm.toAddGroupSeminorm /-- `SeminormClass F π•œ E` states that `F` is a type of seminorms on the `π•œ`-module `E`. You should extend this class when you extend `Seminorm`. -/ class SeminormClass (F : Type*) (π•œ E : outParam <| Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminormClass F E ℝ where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ map_smul_eq_mul (f : F) (a : π•œ) (x : E) : f (a β€’ x) = β€–aβ€– * f x #align seminorm_class SeminormClass export SeminormClass (map_smul_eq_mul) -- Porting note: dangerous instances no longer exist -- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass section Of /-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a `SeminormedRing π•œ`. -/ def Seminorm.of [SeminormedRing π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (add_le : βˆ€ x y : E, f (x + y) ≀ f x + f y) (smul : βˆ€ (a : π•œ) (x : E), f (a β€’ x) = β€–aβ€– * f x) : Seminorm π•œ E where toFun := f map_zero' := by rw [← zero_smul π•œ (0 : E), smul, norm_zero, zero_mul] add_le' := add_le smul' := smul neg' x := by rw [← neg_one_smul π•œ, smul, norm_neg, ← smul, one_smul] #align seminorm.of Seminorm.of /-- Alternative constructor for a `Seminorm` over a normed field `π•œ` that only assumes `f 0 = 0` and an inequality for the scalar multiplication. -/ def Seminorm.ofSMulLE [NormedField π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (map_zero : f 0 = 0) (add_le : βˆ€ x y, f (x + y) ≀ f x + f y) (smul_le : βˆ€ (r : π•œ) (x), f (r β€’ x) ≀ β€–rβ€– * f x) : Seminorm π•œ E := Seminorm.of f add_le fun r x => by refine' le_antisymm (smul_le r x) _ by_cases h : r = 0 Β· simp [h, map_zero] rw [← mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))] rw [inv_mul_cancel_leftβ‚€ (norm_ne_zero_iff.mpr h)] specialize smul_le r⁻¹ (r β€’ x) rw [norm_inv] at smul_le convert smul_le simp [h] #align seminorm.of_smul_le Seminorm.ofSMulLE end Of namespace Seminorm section SeminormedRing variable [SeminormedRing π•œ] section AddGroup variable [AddGroup E] section SMul variable [SMul π•œ E] instance instSeminormClass : SeminormClass (Seminorm π•œ E) π•œ E where coe f := f.toFun coe_injective' f g h := by rcases f with ⟨⟨_⟩⟩ rcases g with ⟨⟨_⟩⟩ congr map_zero f := f.map_zero' map_add_le_add f := f.add_le' map_neg_eq_map f := f.neg' map_smul_eq_mul f := f.smul' #align seminorm.seminorm_class Seminorm.instSeminormClass /-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/ instance instCoeFun : CoeFun (Seminorm π•œ E) fun _ => E β†’ ℝ := FunLike.hasCoeToFun @[ext] theorem ext {p q : Seminorm π•œ E} (h : βˆ€ x, (p : E β†’ ℝ) x = q x) : p = q := FunLike.ext p q h #align seminorm.ext Seminorm.ext instance instZero : Zero (Seminorm π•œ E) := ⟨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with smul' := fun _ _ => (mul_zero _).symm }⟩ @[simp] theorem coe_zero : ⇑(0 : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_zero Seminorm.coe_zero @[simp] theorem zero_apply (x : E) : (0 : Seminorm π•œ E) x = 0 := rfl #align seminorm.zero_apply Seminorm.zero_apply instance : Inhabited (Seminorm π•œ E) := ⟨0⟩ variable (p : Seminorm π•œ E) (c : π•œ) (x y : E) (r : ℝ) /-- Any action on `ℝ` which factors through `ℝβ‰₯0` applies to a seminorm. -/ instance instSMul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : SMul R (Seminorm π•œ E) where smul r p := { r β€’ p.toAddGroupSeminorm with toFun := fun x => r β€’ p x smul' := fun _ _ => by simp only [← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul] rw [map_smul_eq_mul, mul_left_comm] } instance [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] [SMul R' ℝ] [SMul R' ℝβ‰₯0] [IsScalarTower R' ℝβ‰₯0 ℝ] [SMul R R'] [IsScalarTower R R' ℝ] : IsScalarTower R R' (Seminorm π•œ E) where smul_assoc r a p := ext fun x => smul_assoc r a (p x) theorem coe_smul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) : ⇑(r β€’ p) = r β€’ ⇑p := rfl #align seminorm.coe_smul Seminorm.coe_smul @[simp] theorem smul_apply [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) (x : E) : (r β€’ p) x = r β€’ p x := rfl #align seminorm.smul_apply Seminorm.smul_apply instance instAdd : Add (Seminorm π•œ E) where add p q := { p.toAddGroupSeminorm + q.toAddGroupSeminorm with toFun := fun x => p x + q x smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] } theorem coe_add (p q : Seminorm π•œ E) : ⇑(p + q) = p + q := rfl #align seminorm.coe_add Seminorm.coe_add @[simp] theorem add_apply (p q : Seminorm π•œ E) (x : E) : (p + q) x = p x + q x := rfl #align seminorm.add_apply Seminorm.add_apply instance instAddMonoid : AddMonoid (Seminorm π•œ E) := FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π•œ E) := FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl instance instMulAction [Monoid R] [MulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : MulAction R (Seminorm π•œ E) := FunLike.coe_injective.mulAction _ (by intros; rfl) variable (π•œ E) /-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π•œ E` is a module. -/ @[simps] def coeFnAddMonoidHom : AddMonoidHom (Seminorm π•œ E) (E β†’ ℝ) where toFun := (↑) map_zero' := coe_zero map_add' := coe_add #align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π•œ E) := show @Function.Injective (Seminorm π•œ E) (E β†’ ℝ) (↑) from FunLike.coe_injective #align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective variable {π•œ E} instance instDistribMulAction [Monoid R] [DistribMulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : DistribMulAction R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).distribMulAction _ (by intros; rfl) instance instModule [Semiring R] [Module R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : Module R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).module R _ (by intros; rfl) instance instSup : Sup (Seminorm π•œ E) where sup p q := { p.toAddGroupSeminorm βŠ” q.toAddGroupSeminorm with toFun := p βŠ” q smul' := fun x v => (congr_argβ‚‚ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <| (mul_max_of_nonneg _ _ <| norm_nonneg x).symm } @[simp] theorem coe_sup (p q : Seminorm π•œ E) : ⇑(p βŠ” q) = (p : E β†’ ℝ) βŠ” (q : E β†’ ℝ) := rfl #align seminorm.coe_sup Seminorm.coe_sup theorem sup_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ” q) x = p x βŠ” q x := rfl #align seminorm.sup_apply Seminorm.sup_apply theorem smul_sup [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ” q) = r β€’ p βŠ” r β€’ q := have real.smul_max : βˆ€ x y : ℝ, r β€’ max x y = max (r β€’ x) (r β€’ y) := fun x y => by simpa only [← smul_eq_mul, ← NNReal.smul_def, smul_one_smul ℝβ‰₯0 r (_ : ℝ)] using mul_max_of_nonneg x y (r β€’ (1 : ℝβ‰₯0) : ℝβ‰₯0).coe_nonneg ext fun x => real.smul_max _ _ #align seminorm.smul_sup Seminorm.smul_sup instance instPartialOrder : PartialOrder (Seminorm π•œ E) := PartialOrder.lift _ FunLike.coe_injective @[simp, norm_cast] theorem coe_le_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) ≀ q ↔ p ≀ q := Iff.rfl #align seminorm.coe_le_coe Seminorm.coe_le_coe @[simp, norm_cast] theorem coe_lt_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) < q ↔ p < q := Iff.rfl #align seminorm.coe_lt_coe Seminorm.coe_lt_coe theorem le_def {p q : Seminorm π•œ E} : p ≀ q ↔ βˆ€ x, p x ≀ q x := Iff.rfl #align seminorm.le_def Seminorm.le_def theorem lt_def {p q : Seminorm π•œ E} : p < q ↔ p ≀ q ∧ βˆƒ x, p x < q x := @Pi.lt_def _ _ _ p q #align seminorm.lt_def Seminorm.lt_def instance instSemilatticeSup : SemilatticeSup (Seminorm π•œ E) := Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup end SMul end AddGroup section Module variable [SeminormedRing π•œβ‚‚] [SeminormedRing π•œβ‚ƒ] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable {σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₂₃] variable {σ₁₃ : π•œ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₁₃] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [AddCommGroup E₃] variable [AddCommGroup F] [AddCommGroup G] variable [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] [Module π•œβ‚ƒ E₃] [Module π•œ F] [Module π•œ G] -- Porting note: even though this instance is found immediately by typeclass search, -- it seems to be needed below!? noncomputable instance smul_nnreal_real : SMul ℝβ‰₯0 ℝ := inferInstance variable [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] /-- Composition of a seminorm with a linear map is a seminorm. -/ def comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œ E := { p.toAddGroupSeminorm.comp f.toAddMonoidHom with toFun := fun x => p (f x) -- Porting note: the `simp only` below used to be part of the `rw`. -- I'm not sure why this change was needed, and am worried by it! smul' := fun _ _ => by simp only [map_smulβ‚›β‚—]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] } #align seminorm.comp Seminorm.comp theorem coe_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : ⇑(p.comp f) = p ∘ f := rfl #align seminorm.coe_comp Seminorm.coe_comp @[simp] theorem comp_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (x : E) : (p.comp f) x = p (f x) := rfl #align seminorm.comp_apply Seminorm.comp_apply @[simp] theorem comp_id (p : Seminorm π•œ E) : p.comp LinearMap.id = p := ext fun _ => rfl #align seminorm.comp_id Seminorm.comp_id @[simp] theorem comp_zero (p : Seminorm π•œβ‚‚ Eβ‚‚) : p.comp (0 : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) = 0 := ext fun _ => map_zero p #align seminorm.comp_zero Seminorm.comp_zero @[simp] theorem zero_comp (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (0 : Seminorm π•œβ‚‚ Eβ‚‚).comp f = 0 := ext fun _ => rfl #align seminorm.zero_comp Seminorm.zero_comp theorem comp_comp [RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] (p : Seminorm π•œβ‚ƒ E₃) (g : Eβ‚‚ β†’β‚›β‚—[σ₂₃] E₃) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (g.comp f) = (p.comp g).comp f := ext fun _ => rfl #align seminorm.comp_comp Seminorm.comp_comp theorem add_comp (p q : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (p + q).comp f = p.comp f + q.comp f := ext fun _ => rfl #align seminorm.add_comp Seminorm.add_comp theorem comp_add_le (p : Seminorm π•œβ‚‚ Eβ‚‚) (f g : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (f + g) ≀ p.comp f + p.comp g := fun _ => map_add_le_add p _ _ #align seminorm.comp_add_le Seminorm.comp_add_le theorem smul_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : R) : (c β€’ p).comp f = c β€’ p.comp f := ext fun _ => rfl #align seminorm.smul_comp Seminorm.smul_comp theorem comp_mono {p q : Seminorm π•œβ‚‚ Eβ‚‚} (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (hp : p ≀ q) : p.comp f ≀ q.comp f := fun _ => hp _ #align seminorm.comp_mono Seminorm.comp_mono /-- The composition as an `AddMonoidHom`. -/ @[simps] def pullback (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œβ‚‚ Eβ‚‚ β†’+ Seminorm π•œ E where toFun := fun p => p.comp f map_zero' := zero_comp f map_add' := fun p q => add_comp p q f #align seminorm.pullback Seminorm.pullback instance instOrderBot : OrderBot (Seminorm π•œ E) where bot := 0 bot_le := map_nonneg @[simp] theorem coe_bot : ⇑(βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_bot Seminorm.coe_bot theorem bot_eq_zero : (βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.bot_eq_zero Seminorm.bot_eq_zero theorem smul_le_smul {p q : Seminorm π•œ E} {a b : ℝβ‰₯0} (hpq : p ≀ q) (hab : a ≀ b) : a β€’ p ≀ b β€’ q := by simp_rw [le_def] intro x exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b) #align seminorm.smul_le_smul Seminorm.smul_le_smul theorem finset_sup_apply (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = ↑(s.sup fun i => ⟨p i x, map_nonneg (p i) x⟩ : ℝβ‰₯0) := by induction' s using Finset.cons_induction_on with a s ha ih Β· rw [Finset.sup_empty, Finset.sup_empty, coe_bot, _root_.bot_eq_zero, Pi.zero_apply] norm_cast Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max, NNReal.coe_max, NNReal.coe_mk, ih] #align seminorm.finset_sup_apply Seminorm.finset_sup_apply theorem exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) : βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.exists_mem_eq_sup s hs (fun i ↦ (⟨p i x, map_nonneg _ _⟩ : ℝβ‰₯0)) with ⟨i, hi, hix⟩ rw [finset_sup_apply] exact ⟨i, hi, congr_arg _ hix⟩ theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = 0 ∨ βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.eq_empty_or_nonempty s with (rfl|hs) Β· left; rfl Β· right; exact exists_apply_eq_finset_sup p hs x theorem finset_sup_smul (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (C : ℝβ‰₯0) : s.sup (C β€’ p) = C β€’ s.sup p := by ext x rw [smul_apply, finset_sup_apply, finset_sup_apply] symm exact congr_arg ((↑) : ℝβ‰₯0 β†’ ℝ) (NNReal.mul_finset_sup C s (fun i ↦ ⟨p i x, map_nonneg _ _⟩)) theorem finset_sup_le_sum (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) : s.sup p ≀ βˆ‘ i in s, p i := by classical refine' Finset.sup_le_iff.mpr _ intro i hi rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left] exact bot_le #align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum theorem finset_sup_apply_le {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 ≀ a) (h : βˆ€ i, i ∈ s β†’ p i x ≀ a) : s.sup p x ≀ a := by lift a to ℝβ‰₯0 using ha rw [finset_sup_apply, NNReal.coe_le_coe] exact Finset.sup_le h #align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le theorem le_finset_sup_apply {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {i : ΞΉ} (hi : i ∈ s) : p i x ≀ s.sup p x := (Finset.le_sup hi : p i ≀ s.sup p) x theorem finset_sup_apply_lt {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 < a) (h : βˆ€ i, i ∈ s β†’ p i x < a) : s.sup p x < a := by lift a to ℝβ‰₯0 using ha.le rw [finset_sup_apply, NNReal.coe_lt_coe, Finset.sup_lt_iff] Β· exact h Β· exact NNReal.coe_pos.mpr ha #align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt theorem norm_sub_map_le_sub (p : Seminorm π•œ E) (x y : E) : β€–p x - p yβ€– ≀ p (x - y) := abs_sub_map_le_sub p x y #align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub end Module end SeminormedRing section SeminormedCommRing variable [SeminormedRing π•œ] [SeminormedCommRing π•œβ‚‚] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] theorem comp_smul (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) : p.comp (c β€’ f) = β€–cβ€–β‚Š β€’ p.comp f := ext fun _ => by rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm, smul_eq_mul, comp_apply] #align seminorm.comp_smul Seminorm.comp_smul theorem comp_smul_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) (x : E) : p.comp (c β€’ f) x = β€–cβ€– * p (f x) := map_smul_eq_mul p _ _ #align seminorm.comp_smul_apply Seminorm.comp_smul_apply end SeminormedCommRing section NormedField variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] {p q : Seminorm π•œ E} {x : E} /-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/ theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) := ⟨0, by rintro _ ⟨x, rfl⟩ dsimp; positivity⟩ #align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add noncomputable instance instInf : Inf (Seminorm π•œ E) where inf p q := { p.toAddGroupSeminorm βŠ“ q.toAddGroupSeminorm with toFun := fun x => β¨… u : E, p u + q (x - u) smul' := by intro a x obtain rfl | ha := eq_or_ne a 0 Β·
rw [norm_zero, zero_mul, zero_smul]
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 Β·
Mathlib.Analysis.Seminorm.489_0.ywwMCgoKeIFKDZ3
noncomputable instance instInf : Inf (Seminorm π•œ E) where inf p q
Mathlib_Analysis_Seminorm
case inl R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p✝ q✝ : Seminorm π•œ E x✝ : E p q : Seminorm π•œ E src✝ : AddGroupSeminorm E := p.toAddGroupSeminorm βŠ“ q.toAddGroupSeminorm x : E ⊒ AddGroupSeminorm.toFun { toFun := fun x => β¨… u, p u + q (x - u), map_zero' := (_ : AddGroupSeminorm.toFun src✝ 0 = 0), add_le' := (_ : βˆ€ (r s : E), AddGroupSeminorm.toFun src✝ (r + s) ≀ AddGroupSeminorm.toFun src✝ r + AddGroupSeminorm.toFun src✝ s), neg' := (_ : βˆ€ (r : E), AddGroupSeminorm.toFun src✝ (-r) = AddGroupSeminorm.toFun src✝ r) } 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]⟩
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]
Mathlib.Analysis.Seminorm.489_0.ywwMCgoKeIFKDZ3
noncomputable instance instInf : Inf (Seminorm π•œ E) where inf p q
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 x✝¹ : E p q : Seminorm π•œ E src✝ : AddGroupSeminorm E := p.toAddGroupSeminorm βŠ“ q.toAddGroupSeminorm x✝ : E x : ℝ hx : 0 < x ⊒ p 0 + q (0 - 0) < 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]
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
Mathlib.Analysis.Seminorm.489_0.ywwMCgoKeIFKDZ3
noncomputable instance instInf : Inf (Seminorm π•œ E) where inf p q
Mathlib_Analysis_Seminorm
case inr R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p✝ q✝ : Seminorm π•œ E x✝ : E p q : Seminorm π•œ E src✝ : AddGroupSeminorm E := p.toAddGroupSeminorm βŠ“ q.toAddGroupSeminorm a : π•œ x : E ha : a β‰  0 ⊒ AddGroupSeminorm.toFun { toFun := fun x => β¨… u, p u + q (x - u), map_zero' := (_ : AddGroupSeminorm.toFun src✝ 0 = 0), add_le' := (_ : βˆ€ (r s : E), AddGroupSeminorm.toFun src✝ (r + s) ≀ AddGroupSeminorm.toFun src✝ r + AddGroupSeminorm.toFun src✝ s), neg' := (_ : βˆ€ (r : E), AddGroupSeminorm.toFun src✝ (-r) = AddGroupSeminorm.toFun src✝ r) } (a β€’ x) = β€–aβ€– * AddGroupSeminorm.toFun { toFun := fun x => β¨… u, p u + q (x - u), map_zero' := (_ : AddGroupSeminorm.toFun src✝ 0 = 0), add_le' := (_ : βˆ€ (r s : E), AddGroupSeminorm.toFun src✝ (r + s) ≀ AddGroupSeminorm.toFun src✝ r + AddGroupSeminorm.toFun src✝ s), neg' := (_ : βˆ€ (r : E), AddGroupSeminorm.toFun src✝ (-r) = AddGroupSeminorm.toFun src✝ r) } x
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, YaΓ«l Dillies, Moritz Doll -/ import Mathlib.Data.Real.Pointwise import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.LocallyConvex.Basic import Mathlib.Analysis.Normed.Group.AddTorsor #align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c" /-! # Seminorms This file defines seminorms. A seminorm is a function to the reals which is positive-semidefinite, absolutely homogeneous, and subadditive. They are closely related to convex sets, and a topological vector space is locally convex if and only if its topology is induced by a family of seminorms. ## Main declarations For a module over a normed ring: * `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and subadditive. * `normSeminorm π•œ E`: The norm on `E` as a seminorm. ## References * [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966] ## Tags seminorm, locally convex, LCTVS -/ set_option autoImplicit true open NormedField Set Filter open scoped BigOperators NNReal Pointwise Topology Uniformity variable {R R' π•œ π•œβ‚‚ π•œβ‚ƒ 𝕝 E Eβ‚‚ E₃ F G ΞΉ : Type*} /-- A seminorm on a module over a normed ring is a function to the reals that is positive semidefinite, positive homogeneous, and subadditive. -/ structure Seminorm (π•œ : Type*) (E : Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminorm E where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ smul' : βˆ€ (a : π•œ) (x : E), toFun (a β€’ x) = β€–aβ€– * toFun x #align seminorm Seminorm attribute [nolint docBlame] Seminorm.toAddGroupSeminorm /-- `SeminormClass F π•œ E` states that `F` is a type of seminorms on the `π•œ`-module `E`. You should extend this class when you extend `Seminorm`. -/ class SeminormClass (F : Type*) (π•œ E : outParam <| Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminormClass F E ℝ where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ map_smul_eq_mul (f : F) (a : π•œ) (x : E) : f (a β€’ x) = β€–aβ€– * f x #align seminorm_class SeminormClass export SeminormClass (map_smul_eq_mul) -- Porting note: dangerous instances no longer exist -- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass section Of /-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a `SeminormedRing π•œ`. -/ def Seminorm.of [SeminormedRing π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (add_le : βˆ€ x y : E, f (x + y) ≀ f x + f y) (smul : βˆ€ (a : π•œ) (x : E), f (a β€’ x) = β€–aβ€– * f x) : Seminorm π•œ E where toFun := f map_zero' := by rw [← zero_smul π•œ (0 : E), smul, norm_zero, zero_mul] add_le' := add_le smul' := smul neg' x := by rw [← neg_one_smul π•œ, smul, norm_neg, ← smul, one_smul] #align seminorm.of Seminorm.of /-- Alternative constructor for a `Seminorm` over a normed field `π•œ` that only assumes `f 0 = 0` and an inequality for the scalar multiplication. -/ def Seminorm.ofSMulLE [NormedField π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (map_zero : f 0 = 0) (add_le : βˆ€ x y, f (x + y) ≀ f x + f y) (smul_le : βˆ€ (r : π•œ) (x), f (r β€’ x) ≀ β€–rβ€– * f x) : Seminorm π•œ E := Seminorm.of f add_le fun r x => by refine' le_antisymm (smul_le r x) _ by_cases h : r = 0 Β· simp [h, map_zero] rw [← mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))] rw [inv_mul_cancel_leftβ‚€ (norm_ne_zero_iff.mpr h)] specialize smul_le r⁻¹ (r β€’ x) rw [norm_inv] at smul_le convert smul_le simp [h] #align seminorm.of_smul_le Seminorm.ofSMulLE end Of namespace Seminorm section SeminormedRing variable [SeminormedRing π•œ] section AddGroup variable [AddGroup E] section SMul variable [SMul π•œ E] instance instSeminormClass : SeminormClass (Seminorm π•œ E) π•œ E where coe f := f.toFun coe_injective' f g h := by rcases f with ⟨⟨_⟩⟩ rcases g with ⟨⟨_⟩⟩ congr map_zero f := f.map_zero' map_add_le_add f := f.add_le' map_neg_eq_map f := f.neg' map_smul_eq_mul f := f.smul' #align seminorm.seminorm_class Seminorm.instSeminormClass /-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/ instance instCoeFun : CoeFun (Seminorm π•œ E) fun _ => E β†’ ℝ := FunLike.hasCoeToFun @[ext] theorem ext {p q : Seminorm π•œ E} (h : βˆ€ x, (p : E β†’ ℝ) x = q x) : p = q := FunLike.ext p q h #align seminorm.ext Seminorm.ext instance instZero : Zero (Seminorm π•œ E) := ⟨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with smul' := fun _ _ => (mul_zero _).symm }⟩ @[simp] theorem coe_zero : ⇑(0 : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_zero Seminorm.coe_zero @[simp] theorem zero_apply (x : E) : (0 : Seminorm π•œ E) x = 0 := rfl #align seminorm.zero_apply Seminorm.zero_apply instance : Inhabited (Seminorm π•œ E) := ⟨0⟩ variable (p : Seminorm π•œ E) (c : π•œ) (x y : E) (r : ℝ) /-- Any action on `ℝ` which factors through `ℝβ‰₯0` applies to a seminorm. -/ instance instSMul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : SMul R (Seminorm π•œ E) where smul r p := { r β€’ p.toAddGroupSeminorm with toFun := fun x => r β€’ p x smul' := fun _ _ => by simp only [← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul] rw [map_smul_eq_mul, mul_left_comm] } instance [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] [SMul R' ℝ] [SMul R' ℝβ‰₯0] [IsScalarTower R' ℝβ‰₯0 ℝ] [SMul R R'] [IsScalarTower R R' ℝ] : IsScalarTower R R' (Seminorm π•œ E) where smul_assoc r a p := ext fun x => smul_assoc r a (p x) theorem coe_smul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) : ⇑(r β€’ p) = r β€’ ⇑p := rfl #align seminorm.coe_smul Seminorm.coe_smul @[simp] theorem smul_apply [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) (x : E) : (r β€’ p) x = r β€’ p x := rfl #align seminorm.smul_apply Seminorm.smul_apply instance instAdd : Add (Seminorm π•œ E) where add p q := { p.toAddGroupSeminorm + q.toAddGroupSeminorm with toFun := fun x => p x + q x smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] } theorem coe_add (p q : Seminorm π•œ E) : ⇑(p + q) = p + q := rfl #align seminorm.coe_add Seminorm.coe_add @[simp] theorem add_apply (p q : Seminorm π•œ E) (x : E) : (p + q) x = p x + q x := rfl #align seminorm.add_apply Seminorm.add_apply instance instAddMonoid : AddMonoid (Seminorm π•œ E) := FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π•œ E) := FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl instance instMulAction [Monoid R] [MulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : MulAction R (Seminorm π•œ E) := FunLike.coe_injective.mulAction _ (by intros; rfl) variable (π•œ E) /-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π•œ E` is a module. -/ @[simps] def coeFnAddMonoidHom : AddMonoidHom (Seminorm π•œ E) (E β†’ ℝ) where toFun := (↑) map_zero' := coe_zero map_add' := coe_add #align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π•œ E) := show @Function.Injective (Seminorm π•œ E) (E β†’ ℝ) (↑) from FunLike.coe_injective #align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective variable {π•œ E} instance instDistribMulAction [Monoid R] [DistribMulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : DistribMulAction R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).distribMulAction _ (by intros; rfl) instance instModule [Semiring R] [Module R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : Module R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).module R _ (by intros; rfl) instance instSup : Sup (Seminorm π•œ E) where sup p q := { p.toAddGroupSeminorm βŠ” q.toAddGroupSeminorm with toFun := p βŠ” q smul' := fun x v => (congr_argβ‚‚ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <| (mul_max_of_nonneg _ _ <| norm_nonneg x).symm } @[simp] theorem coe_sup (p q : Seminorm π•œ E) : ⇑(p βŠ” q) = (p : E β†’ ℝ) βŠ” (q : E β†’ ℝ) := rfl #align seminorm.coe_sup Seminorm.coe_sup theorem sup_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ” q) x = p x βŠ” q x := rfl #align seminorm.sup_apply Seminorm.sup_apply theorem smul_sup [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ” q) = r β€’ p βŠ” r β€’ q := have real.smul_max : βˆ€ x y : ℝ, r β€’ max x y = max (r β€’ x) (r β€’ y) := fun x y => by simpa only [← smul_eq_mul, ← NNReal.smul_def, smul_one_smul ℝβ‰₯0 r (_ : ℝ)] using mul_max_of_nonneg x y (r β€’ (1 : ℝβ‰₯0) : ℝβ‰₯0).coe_nonneg ext fun x => real.smul_max _ _ #align seminorm.smul_sup Seminorm.smul_sup instance instPartialOrder : PartialOrder (Seminorm π•œ E) := PartialOrder.lift _ FunLike.coe_injective @[simp, norm_cast] theorem coe_le_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) ≀ q ↔ p ≀ q := Iff.rfl #align seminorm.coe_le_coe Seminorm.coe_le_coe @[simp, norm_cast] theorem coe_lt_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) < q ↔ p < q := Iff.rfl #align seminorm.coe_lt_coe Seminorm.coe_lt_coe theorem le_def {p q : Seminorm π•œ E} : p ≀ q ↔ βˆ€ x, p x ≀ q x := Iff.rfl #align seminorm.le_def Seminorm.le_def theorem lt_def {p q : Seminorm π•œ E} : p < q ↔ p ≀ q ∧ βˆƒ x, p x < q x := @Pi.lt_def _ _ _ p q #align seminorm.lt_def Seminorm.lt_def instance instSemilatticeSup : SemilatticeSup (Seminorm π•œ E) := Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup end SMul end AddGroup section Module variable [SeminormedRing π•œβ‚‚] [SeminormedRing π•œβ‚ƒ] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable {σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₂₃] variable {σ₁₃ : π•œ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₁₃] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [AddCommGroup E₃] variable [AddCommGroup F] [AddCommGroup G] variable [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] [Module π•œβ‚ƒ E₃] [Module π•œ F] [Module π•œ G] -- Porting note: even though this instance is found immediately by typeclass search, -- it seems to be needed below!? noncomputable instance smul_nnreal_real : SMul ℝβ‰₯0 ℝ := inferInstance variable [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] /-- Composition of a seminorm with a linear map is a seminorm. -/ def comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œ E := { p.toAddGroupSeminorm.comp f.toAddMonoidHom with toFun := fun x => p (f x) -- Porting note: the `simp only` below used to be part of the `rw`. -- I'm not sure why this change was needed, and am worried by it! smul' := fun _ _ => by simp only [map_smulβ‚›β‚—]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] } #align seminorm.comp Seminorm.comp theorem coe_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : ⇑(p.comp f) = p ∘ f := rfl #align seminorm.coe_comp Seminorm.coe_comp @[simp] theorem comp_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (x : E) : (p.comp f) x = p (f x) := rfl #align seminorm.comp_apply Seminorm.comp_apply @[simp] theorem comp_id (p : Seminorm π•œ E) : p.comp LinearMap.id = p := ext fun _ => rfl #align seminorm.comp_id Seminorm.comp_id @[simp] theorem comp_zero (p : Seminorm π•œβ‚‚ Eβ‚‚) : p.comp (0 : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) = 0 := ext fun _ => map_zero p #align seminorm.comp_zero Seminorm.comp_zero @[simp] theorem zero_comp (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (0 : Seminorm π•œβ‚‚ Eβ‚‚).comp f = 0 := ext fun _ => rfl #align seminorm.zero_comp Seminorm.zero_comp theorem comp_comp [RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] (p : Seminorm π•œβ‚ƒ E₃) (g : Eβ‚‚ β†’β‚›β‚—[σ₂₃] E₃) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (g.comp f) = (p.comp g).comp f := ext fun _ => rfl #align seminorm.comp_comp Seminorm.comp_comp theorem add_comp (p q : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (p + q).comp f = p.comp f + q.comp f := ext fun _ => rfl #align seminorm.add_comp Seminorm.add_comp theorem comp_add_le (p : Seminorm π•œβ‚‚ Eβ‚‚) (f g : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (f + g) ≀ p.comp f + p.comp g := fun _ => map_add_le_add p _ _ #align seminorm.comp_add_le Seminorm.comp_add_le theorem smul_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : R) : (c β€’ p).comp f = c β€’ p.comp f := ext fun _ => rfl #align seminorm.smul_comp Seminorm.smul_comp theorem comp_mono {p q : Seminorm π•œβ‚‚ Eβ‚‚} (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (hp : p ≀ q) : p.comp f ≀ q.comp f := fun _ => hp _ #align seminorm.comp_mono Seminorm.comp_mono /-- The composition as an `AddMonoidHom`. -/ @[simps] def pullback (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œβ‚‚ Eβ‚‚ β†’+ Seminorm π•œ E where toFun := fun p => p.comp f map_zero' := zero_comp f map_add' := fun p q => add_comp p q f #align seminorm.pullback Seminorm.pullback instance instOrderBot : OrderBot (Seminorm π•œ E) where bot := 0 bot_le := map_nonneg @[simp] theorem coe_bot : ⇑(βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_bot Seminorm.coe_bot theorem bot_eq_zero : (βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.bot_eq_zero Seminorm.bot_eq_zero theorem smul_le_smul {p q : Seminorm π•œ E} {a b : ℝβ‰₯0} (hpq : p ≀ q) (hab : a ≀ b) : a β€’ p ≀ b β€’ q := by simp_rw [le_def] intro x exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b) #align seminorm.smul_le_smul Seminorm.smul_le_smul theorem finset_sup_apply (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = ↑(s.sup fun i => ⟨p i x, map_nonneg (p i) x⟩ : ℝβ‰₯0) := by induction' s using Finset.cons_induction_on with a s ha ih Β· rw [Finset.sup_empty, Finset.sup_empty, coe_bot, _root_.bot_eq_zero, Pi.zero_apply] norm_cast Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max, NNReal.coe_max, NNReal.coe_mk, ih] #align seminorm.finset_sup_apply Seminorm.finset_sup_apply theorem exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) : βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.exists_mem_eq_sup s hs (fun i ↦ (⟨p i x, map_nonneg _ _⟩ : ℝβ‰₯0)) with ⟨i, hi, hix⟩ rw [finset_sup_apply] exact ⟨i, hi, congr_arg _ hix⟩ theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = 0 ∨ βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.eq_empty_or_nonempty s with (rfl|hs) Β· left; rfl Β· right; exact exists_apply_eq_finset_sup p hs x theorem finset_sup_smul (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (C : ℝβ‰₯0) : s.sup (C β€’ p) = C β€’ s.sup p := by ext x rw [smul_apply, finset_sup_apply, finset_sup_apply] symm exact congr_arg ((↑) : ℝβ‰₯0 β†’ ℝ) (NNReal.mul_finset_sup C s (fun i ↦ ⟨p i x, map_nonneg _ _⟩)) theorem finset_sup_le_sum (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) : s.sup p ≀ βˆ‘ i in s, p i := by classical refine' Finset.sup_le_iff.mpr _ intro i hi rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left] exact bot_le #align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum theorem finset_sup_apply_le {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 ≀ a) (h : βˆ€ i, i ∈ s β†’ p i x ≀ a) : s.sup p x ≀ a := by lift a to ℝβ‰₯0 using ha rw [finset_sup_apply, NNReal.coe_le_coe] exact Finset.sup_le h #align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le theorem le_finset_sup_apply {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {i : ΞΉ} (hi : i ∈ s) : p i x ≀ s.sup p x := (Finset.le_sup hi : p i ≀ s.sup p) x theorem finset_sup_apply_lt {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 < a) (h : βˆ€ i, i ∈ s β†’ p i x < a) : s.sup p x < a := by lift a to ℝβ‰₯0 using ha.le rw [finset_sup_apply, NNReal.coe_lt_coe, Finset.sup_lt_iff] Β· exact h Β· exact NNReal.coe_pos.mpr ha #align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt theorem norm_sub_map_le_sub (p : Seminorm π•œ E) (x y : E) : β€–p x - p yβ€– ≀ p (x - y) := abs_sub_map_le_sub p x y #align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub end Module end SeminormedRing section SeminormedCommRing variable [SeminormedRing π•œ] [SeminormedCommRing π•œβ‚‚] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] theorem comp_smul (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) : p.comp (c β€’ f) = β€–cβ€–β‚Š β€’ p.comp f := ext fun _ => by rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm, smul_eq_mul, comp_apply] #align seminorm.comp_smul Seminorm.comp_smul theorem comp_smul_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) (x : E) : p.comp (c β€’ f) x = β€–cβ€– * p (f x) := map_smul_eq_mul p _ _ #align seminorm.comp_smul_apply Seminorm.comp_smul_apply end SeminormedCommRing section NormedField variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] {p q : Seminorm π•œ E} {x : E} /-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/ theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) := ⟨0, by rintro _ ⟨x, rfl⟩ dsimp; positivity⟩ #align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add noncomputable instance instInf : Inf (Seminorm π•œ E) where inf p q := { p.toAddGroupSeminorm βŠ“ q.toAddGroupSeminorm with toFun := fun x => β¨… u : E, p u + q (x - u) smul' := by intro a x obtain rfl | ha := eq_or_ne a 0 Β· rw [norm_zero, zero_mul, zero_smul] refine' ciInf_eq_of_forall_ge_of_forall_gt_exists_lt -- Porting note: the following was previously `fun i => by positivity` (fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _)) fun x hx => ⟨0, by rwa [map_zero, sub_zero, map_zero, add_zero]⟩
simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, ← map_smul_eq_mul p, ← map_smul_eq_mul q, smul_sub]
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]⟩
Mathlib.Analysis.Seminorm.489_0.ywwMCgoKeIFKDZ3
noncomputable instance instInf : Inf (Seminorm π•œ E) where inf p q
Mathlib_Analysis_Seminorm
case inr R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p✝ q✝ : Seminorm π•œ E x✝ : E p q : Seminorm π•œ E src✝ : AddGroupSeminorm E := p.toAddGroupSeminorm βŠ“ q.toAddGroupSeminorm a : π•œ x : E ha : a β‰  0 ⊒ β¨… u, p u + q (a β€’ x - u) = β¨… i, p (a β€’ i) + q (a β€’ x - a β€’ 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 => _
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]
Mathlib.Analysis.Seminorm.489_0.ywwMCgoKeIFKDZ3
noncomputable instance instInf : Inf (Seminorm π•œ E) where inf p q
Mathlib_Analysis_Seminorm
case inr R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p✝ q✝ : Seminorm π•œ E x✝ : E p q : Seminorm π•œ E src✝ : AddGroupSeminorm E := p.toAddGroupSeminorm βŠ“ q.toAddGroupSeminorm a : π•œ x : E ha : a β‰  0 u : E ⊒ p (a β€’ (fun x => a⁻¹ β€’ x) u) + q (a β€’ x - a β€’ (fun x => a⁻¹ β€’ x) u) = p u + q (a β€’ x - u)
/- 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]
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 => _
Mathlib.Analysis.Seminorm.489_0.ywwMCgoKeIFKDZ3
noncomputable instance instInf : Inf (Seminorm π•œ E) where inf p q
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 x✝ : E src✝ : SemilatticeSup (Seminorm π•œ E) := instSemilatticeSup p q : Seminorm π•œ E x : E ⊒ p x + q (x - x) ≀ (fun f => ⇑f) 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]
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
Mathlib.Analysis.Seminorm.514_0.ywwMCgoKeIFKDZ3
noncomputable instance instLattice : Lattice (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✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p✝ q✝ : Seminorm π•œ E x✝ : E src✝ : SemilatticeSup (Seminorm π•œ E) := instSemilatticeSup p q : Seminorm π•œ E x : E ⊒ p x ≀ 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
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];
Mathlib.Analysis.Seminorm.514_0.ywwMCgoKeIFKDZ3
noncomputable instance instLattice : Lattice (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✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p✝ q✝ : Seminorm π•œ E x✝ : E src✝ : SemilatticeSup (Seminorm π•œ E) := instSemilatticeSup p q : Seminorm π•œ E x : E ⊒ p 0 + q (x - 0) ≀ (fun f => ⇑f) q 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]
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
Mathlib.Analysis.Seminorm.514_0.ywwMCgoKeIFKDZ3
noncomputable instance instLattice : Lattice (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✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p✝ q✝ : Seminorm π•œ E x✝ : E src✝ : SemilatticeSup (Seminorm π•œ E) := instSemilatticeSup p q : Seminorm π•œ E x : E ⊒ q x ≀ q 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
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];
Mathlib.Analysis.Seminorm.514_0.ywwMCgoKeIFKDZ3
noncomputable instance instLattice : Lattice (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✝⁡ : NormedField π•œ inst✝⁴ : AddCommGroup E inst✝³ : Module π•œ E p✝ q✝ : Seminorm π•œ E x : E inst✝² : SMul R ℝ inst✝¹ : SMul R ℝβ‰₯0 inst✝ : IsScalarTower R ℝβ‰₯0 ℝ r : R p q : Seminorm π•œ E ⊒ r β€’ (p βŠ“ q) = r β€’ p βŠ“ r β€’ q
/- 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
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
Mathlib.Analysis.Seminorm.526_0.ywwMCgoKeIFKDZ3
theorem smul_inf [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ“ q) = r β€’ p βŠ“ r β€’ q
Mathlib_Analysis_Seminorm
case h R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝⁡ : NormedField π•œ inst✝⁴ : AddCommGroup E inst✝³ : Module π•œ E p✝ q✝ : Seminorm π•œ E x : E inst✝² : SMul R ℝ inst✝¹ : SMul R ℝβ‰₯0 inst✝ : IsScalarTower R ℝβ‰₯0 ℝ r : R p q : Seminorm π•œ E x✝ : E ⊒ (r β€’ (p βŠ“ q)) x✝ = (r β€’ p βŠ“ r β€’ q) 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]
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
Mathlib.Analysis.Seminorm.526_0.ywwMCgoKeIFKDZ3
theorem smul_inf [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ“ q) = r β€’ p βŠ“ r β€’ q
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 x : E s : Set (Seminorm π•œ E) h : BddAbove (FunLike.coe '' s) ⊒ iSup (fun p => ⇑↑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]
/-- 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
Mathlib.Analysis.Seminorm.537_0.ywwMCgoKeIFKDZ3
/-- 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
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 x : E s : Set (Seminorm π•œ E) h : BddAbove (FunLike.coe '' s) ⊒ ⨆ i, ↑i 0 = ⨆ x, 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!
/-- 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]
Mathlib.Analysis.Seminorm.537_0.ywwMCgoKeIFKDZ3
/-- 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
Mathlib_Analysis_Seminorm
case h.e'_4.h R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p q : Seminorm π•œ E x : E s : Set (Seminorm π•œ E) h : BddAbove (FunLike.coe '' s) x✝ : ↑s ⊒ ↑x✝ 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
/-- 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!
Mathlib.Analysis.Seminorm.537_0.ywwMCgoKeIFKDZ3
/-- 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
Mathlib_Analysis_Seminorm
case h.e'_4.h R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p q : Seminorm π•œ E x : E s : Set (Seminorm π•œ E) h : BddAbove (FunLike.coe '' s) i : ↑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
/-- 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
Mathlib.Analysis.Seminorm.537_0.ywwMCgoKeIFKDZ3
/-- 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
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 x✝ : E s : Set (Seminorm π•œ E) h : BddAbove (FunLike.coe '' s) x y : E ⊒ iSup (fun p => ⇑↑p) (x + y) ≀ iSup (fun p => ⇑↑p) x + iSup (fun p => ⇑↑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⟩
/-- 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
Mathlib.Analysis.Seminorm.537_0.ywwMCgoKeIFKDZ3
/-- 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
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 q✝ : Seminorm π•œ E x✝ : E s : Set (Seminorm π•œ E) x y : E q : E β†’ ℝ hq : q ∈ upperBounds (FunLike.coe '' s) ⊒ iSup (fun p => ⇑↑p) (x + y) ≀ iSup (fun p => ⇑↑p) x + iSup (fun p => ⇑↑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
/-- 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⟩
Mathlib.Analysis.Seminorm.537_0.ywwMCgoKeIFKDZ3
/-- 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
Mathlib_Analysis_Seminorm
case intro.inl R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p q✝ : Seminorm π•œ E x✝ x y : E q : E β†’ ℝ hq : q ∈ upperBounds (FunLike.coe '' βˆ…) ⊒ iSup (fun p => ⇑↑p) (x + y) ≀ iSup (fun p => ⇑↑p) x + iSup (fun p => ⇑↑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]
/-- 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 Β·
Mathlib.Analysis.Seminorm.537_0.ywwMCgoKeIFKDZ3
/-- 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
Mathlib_Analysis_Seminorm
case intro.inr R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p q✝ : Seminorm π•œ E x✝ : E s : Set (Seminorm π•œ E) x y : E q : E β†’ ℝ hq : q ∈ upperBounds (FunLike.coe '' s) h : Set.Nonempty s ⊒ iSup (fun p => ⇑↑p) (x + y) ≀ iSup (fun p => ⇑↑p) x + iSup (fun p => ⇑↑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
/-- 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]
Mathlib.Analysis.Seminorm.537_0.ywwMCgoKeIFKDZ3
/-- 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
Mathlib_Analysis_Seminorm
case intro.inr R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p q✝ : Seminorm π•œ E x✝ : E s : Set (Seminorm π•œ E) x y : E q : E β†’ ℝ hq : q ∈ upperBounds (FunLike.coe '' s) h : Set.Nonempty s this : Nonempty ↑s ⊒ iSup (fun p => ⇑↑p) (x + y) ≀ iSup (fun p => ⇑↑p) x + iSup (fun p => ⇑↑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]
/-- 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
Mathlib.Analysis.Seminorm.537_0.ywwMCgoKeIFKDZ3
/-- 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
Mathlib_Analysis_Seminorm
case intro.inr R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p q✝ : Seminorm π•œ E x✝ : E s : Set (Seminorm π•œ E) x y : E q : E β†’ ℝ hq : q ∈ upperBounds (FunLike.coe '' s) h : Set.Nonempty s this : Nonempty ↑s ⊒ ⨆ i, ↑i (x + y) ≀ (⨆ i, ↑i x) + ⨆ i, ↑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)
/-- 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]
Mathlib.Analysis.Seminorm.537_0.ywwMCgoKeIFKDZ3
/-- 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
Mathlib_Analysis_Seminorm
case intro.inr.refine'_1 R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p q✝ : Seminorm π•œ E x✝ : E s : Set (Seminorm π•œ E) x y : E q : E β†’ ℝ hq : q ∈ upperBounds (FunLike.coe '' s) h : Set.Nonempty s this : Nonempty ↑s i : ↑s ⊒ q x ∈ upperBounds (range fun i => AddGroupSeminorm.toFun (↑i).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]
/-- 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) <;>
Mathlib.Analysis.Seminorm.537_0.ywwMCgoKeIFKDZ3
/-- 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
Mathlib_Analysis_Seminorm
case intro.inr.refine'_2 R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p q✝ : Seminorm π•œ E x✝ : E s : Set (Seminorm π•œ E) x y : E q : E β†’ ℝ hq : q ∈ upperBounds (FunLike.coe '' s) h : Set.Nonempty s this : Nonempty ↑s i : ↑s ⊒ q y ∈ upperBounds (range fun i => AddGroupSeminorm.toFun (↑i).toAddGroupSeminorm 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]
/-- 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) <;>
Mathlib.Analysis.Seminorm.537_0.ywwMCgoKeIFKDZ3
/-- 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
Mathlib_Analysis_Seminorm
case intro.inr.refine'_1 R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p q✝ : Seminorm π•œ E x✝ : E s : Set (Seminorm π•œ E) x y : E q : E β†’ ℝ hq : q ∈ upperBounds (FunLike.coe '' s) h : Set.Nonempty s this : Nonempty ↑s i : ↑s ⊒ βˆ€ (i : { x // x ∈ s }), AddGroupSeminorm.toFun (↑i).toAddGroupSeminorm x ≀ q 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) _
/-- 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] <;>
Mathlib.Analysis.Seminorm.537_0.ywwMCgoKeIFKDZ3
/-- 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
Mathlib_Analysis_Seminorm
case intro.inr.refine'_2 R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p q✝ : Seminorm π•œ E x✝ : E s : Set (Seminorm π•œ E) x y : E q : E β†’ ℝ hq : q ∈ upperBounds (FunLike.coe '' s) h : Set.Nonempty s this : Nonempty ↑s i : ↑s ⊒ βˆ€ (i : { x // x ∈ s }), AddGroupSeminorm.toFun (↑i).toAddGroupSeminorm y ≀ q 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) _
/-- 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] <;>
Mathlib.Analysis.Seminorm.537_0.ywwMCgoKeIFKDZ3
/-- 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
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 x✝ : E s : Set (Seminorm π•œ E) h : BddAbove (FunLike.coe '' s) x : E ⊒ iSup (fun p => ⇑↑p) (-x) = iSup (fun p => ⇑↑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]
/-- 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
Mathlib.Analysis.Seminorm.537_0.ywwMCgoKeIFKDZ3
/-- 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
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 x✝ : E s : Set (Seminorm π•œ E) h : BddAbove (FunLike.coe '' s) x : E ⊒ ⨆ i, ↑i (-x) = ⨆ i, ↑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
/-- 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]
Mathlib.Analysis.Seminorm.537_0.ywwMCgoKeIFKDZ3
/-- 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
Mathlib_Analysis_Seminorm
case h.e'_4.h R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p q : Seminorm π•œ E x✝¹ : E s : Set (Seminorm π•œ E) h : BddAbove (FunLike.coe '' s) x : E x✝ : ↑s ⊒ ↑x✝ (-x) = ↑x✝ x
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, YaΓ«l Dillies, Moritz Doll -/ import Mathlib.Data.Real.Pointwise import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.LocallyConvex.Basic import Mathlib.Analysis.Normed.Group.AddTorsor #align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c" /-! # Seminorms This file defines seminorms. A seminorm is a function to the reals which is positive-semidefinite, absolutely homogeneous, and subadditive. They are closely related to convex sets, and a topological vector space is locally convex if and only if its topology is induced by a family of seminorms. ## Main declarations For a module over a normed ring: * `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and subadditive. * `normSeminorm π•œ E`: The norm on `E` as a seminorm. ## References * [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966] ## Tags seminorm, locally convex, LCTVS -/ set_option autoImplicit true open NormedField Set Filter open scoped BigOperators NNReal Pointwise Topology Uniformity variable {R R' π•œ π•œβ‚‚ π•œβ‚ƒ 𝕝 E Eβ‚‚ E₃ F G ΞΉ : Type*} /-- A seminorm on a module over a normed ring is a function to the reals that is positive semidefinite, positive homogeneous, and subadditive. -/ structure Seminorm (π•œ : Type*) (E : Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminorm E where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ smul' : βˆ€ (a : π•œ) (x : E), toFun (a β€’ x) = β€–aβ€– * toFun x #align seminorm Seminorm attribute [nolint docBlame] Seminorm.toAddGroupSeminorm /-- `SeminormClass F π•œ E` states that `F` is a type of seminorms on the `π•œ`-module `E`. You should extend this class when you extend `Seminorm`. -/ class SeminormClass (F : Type*) (π•œ E : outParam <| Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminormClass F E ℝ where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ map_smul_eq_mul (f : F) (a : π•œ) (x : E) : f (a β€’ x) = β€–aβ€– * f x #align seminorm_class SeminormClass export SeminormClass (map_smul_eq_mul) -- Porting note: dangerous instances no longer exist -- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass section Of /-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a `SeminormedRing π•œ`. -/ def Seminorm.of [SeminormedRing π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (add_le : βˆ€ x y : E, f (x + y) ≀ f x + f y) (smul : βˆ€ (a : π•œ) (x : E), f (a β€’ x) = β€–aβ€– * f x) : Seminorm π•œ E where toFun := f map_zero' := by rw [← zero_smul π•œ (0 : E), smul, norm_zero, zero_mul] add_le' := add_le smul' := smul neg' x := by rw [← neg_one_smul π•œ, smul, norm_neg, ← smul, one_smul] #align seminorm.of Seminorm.of /-- Alternative constructor for a `Seminorm` over a normed field `π•œ` that only assumes `f 0 = 0` and an inequality for the scalar multiplication. -/ def Seminorm.ofSMulLE [NormedField π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (map_zero : f 0 = 0) (add_le : βˆ€ x y, f (x + y) ≀ f x + f y) (smul_le : βˆ€ (r : π•œ) (x), f (r β€’ x) ≀ β€–rβ€– * f x) : Seminorm π•œ E := Seminorm.of f add_le fun r x => by refine' le_antisymm (smul_le r x) _ by_cases h : r = 0 Β· simp [h, map_zero] rw [← mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))] rw [inv_mul_cancel_leftβ‚€ (norm_ne_zero_iff.mpr h)] specialize smul_le r⁻¹ (r β€’ x) rw [norm_inv] at smul_le convert smul_le simp [h] #align seminorm.of_smul_le Seminorm.ofSMulLE end Of namespace Seminorm section SeminormedRing variable [SeminormedRing π•œ] section AddGroup variable [AddGroup E] section SMul variable [SMul π•œ E] instance instSeminormClass : SeminormClass (Seminorm π•œ E) π•œ E where coe f := f.toFun coe_injective' f g h := by rcases f with ⟨⟨_⟩⟩ rcases g with ⟨⟨_⟩⟩ congr map_zero f := f.map_zero' map_add_le_add f := f.add_le' map_neg_eq_map f := f.neg' map_smul_eq_mul f := f.smul' #align seminorm.seminorm_class Seminorm.instSeminormClass /-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/ instance instCoeFun : CoeFun (Seminorm π•œ E) fun _ => E β†’ ℝ := FunLike.hasCoeToFun @[ext] theorem ext {p q : Seminorm π•œ E} (h : βˆ€ x, (p : E β†’ ℝ) x = q x) : p = q := FunLike.ext p q h #align seminorm.ext Seminorm.ext instance instZero : Zero (Seminorm π•œ E) := ⟨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with smul' := fun _ _ => (mul_zero _).symm }⟩ @[simp] theorem coe_zero : ⇑(0 : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_zero Seminorm.coe_zero @[simp] theorem zero_apply (x : E) : (0 : Seminorm π•œ E) x = 0 := rfl #align seminorm.zero_apply Seminorm.zero_apply instance : Inhabited (Seminorm π•œ E) := ⟨0⟩ variable (p : Seminorm π•œ E) (c : π•œ) (x y : E) (r : ℝ) /-- Any action on `ℝ` which factors through `ℝβ‰₯0` applies to a seminorm. -/ instance instSMul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : SMul R (Seminorm π•œ E) where smul r p := { r β€’ p.toAddGroupSeminorm with toFun := fun x => r β€’ p x smul' := fun _ _ => by simp only [← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul] rw [map_smul_eq_mul, mul_left_comm] } instance [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] [SMul R' ℝ] [SMul R' ℝβ‰₯0] [IsScalarTower R' ℝβ‰₯0 ℝ] [SMul R R'] [IsScalarTower R R' ℝ] : IsScalarTower R R' (Seminorm π•œ E) where smul_assoc r a p := ext fun x => smul_assoc r a (p x) theorem coe_smul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) : ⇑(r β€’ p) = r β€’ ⇑p := rfl #align seminorm.coe_smul Seminorm.coe_smul @[simp] theorem smul_apply [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) (x : E) : (r β€’ p) x = r β€’ p x := rfl #align seminorm.smul_apply Seminorm.smul_apply instance instAdd : Add (Seminorm π•œ E) where add p q := { p.toAddGroupSeminorm + q.toAddGroupSeminorm with toFun := fun x => p x + q x smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] } theorem coe_add (p q : Seminorm π•œ E) : ⇑(p + q) = p + q := rfl #align seminorm.coe_add Seminorm.coe_add @[simp] theorem add_apply (p q : Seminorm π•œ E) (x : E) : (p + q) x = p x + q x := rfl #align seminorm.add_apply Seminorm.add_apply instance instAddMonoid : AddMonoid (Seminorm π•œ E) := FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π•œ E) := FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl instance instMulAction [Monoid R] [MulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : MulAction R (Seminorm π•œ E) := FunLike.coe_injective.mulAction _ (by intros; rfl) variable (π•œ E) /-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π•œ E` is a module. -/ @[simps] def coeFnAddMonoidHom : AddMonoidHom (Seminorm π•œ E) (E β†’ ℝ) where toFun := (↑) map_zero' := coe_zero map_add' := coe_add #align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π•œ E) := show @Function.Injective (Seminorm π•œ E) (E β†’ ℝ) (↑) from FunLike.coe_injective #align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective variable {π•œ E} instance instDistribMulAction [Monoid R] [DistribMulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : DistribMulAction R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).distribMulAction _ (by intros; rfl) instance instModule [Semiring R] [Module R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : Module R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).module R _ (by intros; rfl) instance instSup : Sup (Seminorm π•œ E) where sup p q := { p.toAddGroupSeminorm βŠ” q.toAddGroupSeminorm with toFun := p βŠ” q smul' := fun x v => (congr_argβ‚‚ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <| (mul_max_of_nonneg _ _ <| norm_nonneg x).symm } @[simp] theorem coe_sup (p q : Seminorm π•œ E) : ⇑(p βŠ” q) = (p : E β†’ ℝ) βŠ” (q : E β†’ ℝ) := rfl #align seminorm.coe_sup Seminorm.coe_sup theorem sup_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ” q) x = p x βŠ” q x := rfl #align seminorm.sup_apply Seminorm.sup_apply theorem smul_sup [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ” q) = r β€’ p βŠ” r β€’ q := have real.smul_max : βˆ€ x y : ℝ, r β€’ max x y = max (r β€’ x) (r β€’ y) := fun x y => by simpa only [← smul_eq_mul, ← NNReal.smul_def, smul_one_smul ℝβ‰₯0 r (_ : ℝ)] using mul_max_of_nonneg x y (r β€’ (1 : ℝβ‰₯0) : ℝβ‰₯0).coe_nonneg ext fun x => real.smul_max _ _ #align seminorm.smul_sup Seminorm.smul_sup instance instPartialOrder : PartialOrder (Seminorm π•œ E) := PartialOrder.lift _ FunLike.coe_injective @[simp, norm_cast] theorem coe_le_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) ≀ q ↔ p ≀ q := Iff.rfl #align seminorm.coe_le_coe Seminorm.coe_le_coe @[simp, norm_cast] theorem coe_lt_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) < q ↔ p < q := Iff.rfl #align seminorm.coe_lt_coe Seminorm.coe_lt_coe theorem le_def {p q : Seminorm π•œ E} : p ≀ q ↔ βˆ€ x, p x ≀ q x := Iff.rfl #align seminorm.le_def Seminorm.le_def theorem lt_def {p q : Seminorm π•œ E} : p < q ↔ p ≀ q ∧ βˆƒ x, p x < q x := @Pi.lt_def _ _ _ p q #align seminorm.lt_def Seminorm.lt_def instance instSemilatticeSup : SemilatticeSup (Seminorm π•œ E) := Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup end SMul end AddGroup section Module variable [SeminormedRing π•œβ‚‚] [SeminormedRing π•œβ‚ƒ] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable {σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₂₃] variable {σ₁₃ : π•œ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₁₃] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [AddCommGroup E₃] variable [AddCommGroup F] [AddCommGroup G] variable [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] [Module π•œβ‚ƒ E₃] [Module π•œ F] [Module π•œ G] -- Porting note: even though this instance is found immediately by typeclass search, -- it seems to be needed below!? noncomputable instance smul_nnreal_real : SMul ℝβ‰₯0 ℝ := inferInstance variable [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] /-- Composition of a seminorm with a linear map is a seminorm. -/ def comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œ E := { p.toAddGroupSeminorm.comp f.toAddMonoidHom with toFun := fun x => p (f x) -- Porting note: the `simp only` below used to be part of the `rw`. -- I'm not sure why this change was needed, and am worried by it! smul' := fun _ _ => by simp only [map_smulβ‚›β‚—]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] } #align seminorm.comp Seminorm.comp theorem coe_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : ⇑(p.comp f) = p ∘ f := rfl #align seminorm.coe_comp Seminorm.coe_comp @[simp] theorem comp_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (x : E) : (p.comp f) x = p (f x) := rfl #align seminorm.comp_apply Seminorm.comp_apply @[simp] theorem comp_id (p : Seminorm π•œ E) : p.comp LinearMap.id = p := ext fun _ => rfl #align seminorm.comp_id Seminorm.comp_id @[simp] theorem comp_zero (p : Seminorm π•œβ‚‚ Eβ‚‚) : p.comp (0 : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) = 0 := ext fun _ => map_zero p #align seminorm.comp_zero Seminorm.comp_zero @[simp] theorem zero_comp (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (0 : Seminorm π•œβ‚‚ Eβ‚‚).comp f = 0 := ext fun _ => rfl #align seminorm.zero_comp Seminorm.zero_comp theorem comp_comp [RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] (p : Seminorm π•œβ‚ƒ E₃) (g : Eβ‚‚ β†’β‚›β‚—[σ₂₃] E₃) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (g.comp f) = (p.comp g).comp f := ext fun _ => rfl #align seminorm.comp_comp Seminorm.comp_comp theorem add_comp (p q : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (p + q).comp f = p.comp f + q.comp f := ext fun _ => rfl #align seminorm.add_comp Seminorm.add_comp theorem comp_add_le (p : Seminorm π•œβ‚‚ Eβ‚‚) (f g : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (f + g) ≀ p.comp f + p.comp g := fun _ => map_add_le_add p _ _ #align seminorm.comp_add_le Seminorm.comp_add_le theorem smul_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : R) : (c β€’ p).comp f = c β€’ p.comp f := ext fun _ => rfl #align seminorm.smul_comp Seminorm.smul_comp theorem comp_mono {p q : Seminorm π•œβ‚‚ Eβ‚‚} (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (hp : p ≀ q) : p.comp f ≀ q.comp f := fun _ => hp _ #align seminorm.comp_mono Seminorm.comp_mono /-- The composition as an `AddMonoidHom`. -/ @[simps] def pullback (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œβ‚‚ Eβ‚‚ β†’+ Seminorm π•œ E where toFun := fun p => p.comp f map_zero' := zero_comp f map_add' := fun p q => add_comp p q f #align seminorm.pullback Seminorm.pullback instance instOrderBot : OrderBot (Seminorm π•œ E) where bot := 0 bot_le := map_nonneg @[simp] theorem coe_bot : ⇑(βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_bot Seminorm.coe_bot theorem bot_eq_zero : (βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.bot_eq_zero Seminorm.bot_eq_zero theorem smul_le_smul {p q : Seminorm π•œ E} {a b : ℝβ‰₯0} (hpq : p ≀ q) (hab : a ≀ b) : a β€’ p ≀ b β€’ q := by simp_rw [le_def] intro x exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b) #align seminorm.smul_le_smul Seminorm.smul_le_smul theorem finset_sup_apply (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = ↑(s.sup fun i => ⟨p i x, map_nonneg (p i) x⟩ : ℝβ‰₯0) := by induction' s using Finset.cons_induction_on with a s ha ih Β· rw [Finset.sup_empty, Finset.sup_empty, coe_bot, _root_.bot_eq_zero, Pi.zero_apply] norm_cast Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max, NNReal.coe_max, NNReal.coe_mk, ih] #align seminorm.finset_sup_apply Seminorm.finset_sup_apply theorem exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) : βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.exists_mem_eq_sup s hs (fun i ↦ (⟨p i x, map_nonneg _ _⟩ : ℝβ‰₯0)) with ⟨i, hi, hix⟩ rw [finset_sup_apply] exact ⟨i, hi, congr_arg _ hix⟩ theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = 0 ∨ βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.eq_empty_or_nonempty s with (rfl|hs) Β· left; rfl Β· right; exact exists_apply_eq_finset_sup p hs x theorem finset_sup_smul (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (C : ℝβ‰₯0) : s.sup (C β€’ p) = C β€’ s.sup p := by ext x rw [smul_apply, finset_sup_apply, finset_sup_apply] symm exact congr_arg ((↑) : ℝβ‰₯0 β†’ ℝ) (NNReal.mul_finset_sup C s (fun i ↦ ⟨p i x, map_nonneg _ _⟩)) theorem finset_sup_le_sum (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) : s.sup p ≀ βˆ‘ i in s, p i := by classical refine' Finset.sup_le_iff.mpr _ intro i hi rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left] exact bot_le #align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum theorem finset_sup_apply_le {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 ≀ a) (h : βˆ€ i, i ∈ s β†’ p i x ≀ a) : s.sup p x ≀ a := by lift a to ℝβ‰₯0 using ha rw [finset_sup_apply, NNReal.coe_le_coe] exact Finset.sup_le h #align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le theorem le_finset_sup_apply {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {i : ΞΉ} (hi : i ∈ s) : p i x ≀ s.sup p x := (Finset.le_sup hi : p i ≀ s.sup p) x theorem finset_sup_apply_lt {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 < a) (h : βˆ€ i, i ∈ s β†’ p i x < a) : s.sup p x < a := by lift a to ℝβ‰₯0 using ha.le rw [finset_sup_apply, NNReal.coe_lt_coe, Finset.sup_lt_iff] Β· exact h Β· exact NNReal.coe_pos.mpr ha #align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt theorem norm_sub_map_le_sub (p : Seminorm π•œ E) (x y : E) : β€–p x - p yβ€– ≀ p (x - y) := abs_sub_map_le_sub p x y #align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub end Module end SeminormedRing section SeminormedCommRing variable [SeminormedRing π•œ] [SeminormedCommRing π•œβ‚‚] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] theorem comp_smul (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) : p.comp (c β€’ f) = β€–cβ€–β‚Š β€’ p.comp f := ext fun _ => by rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm, smul_eq_mul, comp_apply] #align seminorm.comp_smul Seminorm.comp_smul theorem comp_smul_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) (x : E) : p.comp (c β€’ f) x = β€–cβ€– * p (f x) := map_smul_eq_mul p _ _ #align seminorm.comp_smul_apply Seminorm.comp_smul_apply end SeminormedCommRing section NormedField variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] {p q : Seminorm π•œ E} {x : E} /-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/ theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) := ⟨0, by rintro _ ⟨x, rfl⟩ dsimp; positivity⟩ #align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add noncomputable instance instInf : Inf (Seminorm π•œ E) where inf p q := { p.toAddGroupSeminorm βŠ“ q.toAddGroupSeminorm with toFun := fun x => β¨… u : E, p u + q (x - u) smul' := by intro a x obtain rfl | ha := eq_or_ne a 0 Β· rw [norm_zero, zero_mul, zero_smul] refine' ciInf_eq_of_forall_ge_of_forall_gt_exists_lt -- Porting note: the following was previously `fun i => by positivity` (fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _)) fun x hx => ⟨0, by rwa [map_zero, sub_zero, map_zero, add_zero]⟩ simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, ← map_smul_eq_mul p, ← map_smul_eq_mul q, smul_sub] refine' Function.Surjective.iInf_congr ((a⁻¹ β€’ Β·) : E β†’ E) (fun u => ⟨a β€’ u, inv_smul_smulβ‚€ ha u⟩) fun u => _ rw [smul_inv_smulβ‚€ ha] } @[simp] theorem inf_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ“ q) x = β¨… u : E, p u + q (x - u) := rfl #align seminorm.inf_apply Seminorm.inf_apply noncomputable instance instLattice : Lattice (Seminorm π•œ E) := { Seminorm.instSemilatticeSup with inf := (Β· βŠ“ Β·) inf_le_left := fun p q x => ciInf_le_of_le bddBelow_range_add x <| by simp only [sub_self, map_zero, add_zero]; rfl inf_le_right := fun p q x => ciInf_le_of_le bddBelow_range_add 0 <| by simp only [sub_self, map_zero, zero_add, sub_zero]; rfl le_inf := fun a b c hab hac x => le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) } theorem smul_inf [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ“ q) = r β€’ p βŠ“ r β€’ q := by ext simp_rw [smul_apply, inf_apply, smul_apply, ← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add] #align seminorm.smul_inf Seminorm.smul_inf section Classical open Classical /-- We define the supremum of an arbitrary subset of `Seminorm π•œ E` as follows: * if `s` is `BddAbove` *as a set of functions `E β†’ ℝ`* (that is, if `s` is pointwise bounded above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a seminorm. * otherwise, we take the zero seminorm `βŠ₯`. There are two things worth mentioning here: * First, it is not trivial at first that `s` being bounded above *by a function* implies being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make the case disjunction on `BddAbove ((↑) '' s : Set (E β†’ ℝ))` and not `BddAbove s`. * Since the pointwise `Sup` already gives `0` at points where a family of functions is not bounded above, one could hope that just using the pointwise `Sup` would work here, without the need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can give a function which does *not* satisfy the seminorm axioms (typically sub-additivity). -/ noncomputable instance instSupSet : SupSet (Seminorm π•œ E) where sSup s := if h : BddAbove ((↑) '' s : Set (E β†’ ℝ)) then { toFun := ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) map_zero' := by rw [iSup_apply, ← @Real.ciSup_const_zero s] congr! rename_i _ _ _ i exact map_zero i.1 add_le' := fun x y => by rcases h with ⟨q, hq⟩ obtain rfl | h := s.eq_empty_or_nonempty Β· simp [Real.ciSup_empty] haveI : Nonempty ↑s := h.coe_sort simp only [iSup_apply] refine' ciSup_le fun i => ((i : Seminorm π•œ E).add_le' x y).trans <| add_le_add -- Porting note: `f` is provided to force `Subtype.val` to appear. -- A type ascription on `_` would have also worked, but would have been more verbose. (le_ciSup (f := fun i => (Subtype.val i : Seminorm π•œ E).toFun x) ⟨q x, _⟩ i) (le_ciSup (f := fun i => (Subtype.val i : Seminorm π•œ E).toFun y) ⟨q y, _⟩ i) <;> rw [mem_upperBounds, forall_range_iff] <;> exact fun j => hq (mem_image_of_mem _ j.2) _ neg' := fun x => by simp only [iSup_apply] congr! 2
rename_i _ _ _ i
/-- 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
Mathlib.Analysis.Seminorm.537_0.ywwMCgoKeIFKDZ3
/-- 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
Mathlib_Analysis_Seminorm
case h.e'_4.h R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p q : Seminorm π•œ E x✝ : E s : Set (Seminorm π•œ E) h : BddAbove (FunLike.coe '' s) x : E i : ↑s ⊒ ↑i (-x) = ↑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' _
/-- 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
Mathlib.Analysis.Seminorm.537_0.ywwMCgoKeIFKDZ3
/-- 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
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 x✝ : E s : Set (Seminorm π•œ E) h : BddAbove (FunLike.coe '' s) a : π•œ x : E ⊒ AddGroupSeminorm.toFun { toFun := ⨆ p, ⇑↑p, map_zero' := (_ : iSup (fun p => ⇑↑p) 0 = 0), add_le' := (_ : βˆ€ (x y : E), iSup (fun p => ⇑↑p) (x + y) ≀ iSup (fun p => ⇑↑p) x + iSup (fun p => ⇑↑p) y), neg' := (_ : βˆ€ (x : E), iSup (fun p => ⇑↑p) (-x) = iSup (fun p => ⇑↑p) x) } (a β€’ x) = β€–aβ€– * AddGroupSeminorm.toFun { toFun := ⨆ p, ⇑↑p, map_zero' := (_ : iSup (fun p => ⇑↑p) 0 = 0), add_le' := (_ : βˆ€ (x y : E), iSup (fun p => ⇑↑p) (x + y) ≀ iSup (fun p => ⇑↑p) x + iSup (fun p => ⇑↑p) y), neg' := (_ : βˆ€ (x : E), iSup (fun p => ⇑↑p) (-x) = iSup (fun p => ⇑↑p) x) } x
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, YaΓ«l Dillies, Moritz Doll -/ import Mathlib.Data.Real.Pointwise import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.LocallyConvex.Basic import Mathlib.Analysis.Normed.Group.AddTorsor #align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c" /-! # Seminorms This file defines seminorms. A seminorm is a function to the reals which is positive-semidefinite, absolutely homogeneous, and subadditive. They are closely related to convex sets, and a topological vector space is locally convex if and only if its topology is induced by a family of seminorms. ## Main declarations For a module over a normed ring: * `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and subadditive. * `normSeminorm π•œ E`: The norm on `E` as a seminorm. ## References * [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966] ## Tags seminorm, locally convex, LCTVS -/ set_option autoImplicit true open NormedField Set Filter open scoped BigOperators NNReal Pointwise Topology Uniformity variable {R R' π•œ π•œβ‚‚ π•œβ‚ƒ 𝕝 E Eβ‚‚ E₃ F G ΞΉ : Type*} /-- A seminorm on a module over a normed ring is a function to the reals that is positive semidefinite, positive homogeneous, and subadditive. -/ structure Seminorm (π•œ : Type*) (E : Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminorm E where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ smul' : βˆ€ (a : π•œ) (x : E), toFun (a β€’ x) = β€–aβ€– * toFun x #align seminorm Seminorm attribute [nolint docBlame] Seminorm.toAddGroupSeminorm /-- `SeminormClass F π•œ E` states that `F` is a type of seminorms on the `π•œ`-module `E`. You should extend this class when you extend `Seminorm`. -/ class SeminormClass (F : Type*) (π•œ E : outParam <| Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminormClass F E ℝ where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ map_smul_eq_mul (f : F) (a : π•œ) (x : E) : f (a β€’ x) = β€–aβ€– * f x #align seminorm_class SeminormClass export SeminormClass (map_smul_eq_mul) -- Porting note: dangerous instances no longer exist -- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass section Of /-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a `SeminormedRing π•œ`. -/ def Seminorm.of [SeminormedRing π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (add_le : βˆ€ x y : E, f (x + y) ≀ f x + f y) (smul : βˆ€ (a : π•œ) (x : E), f (a β€’ x) = β€–aβ€– * f x) : Seminorm π•œ E where toFun := f map_zero' := by rw [← zero_smul π•œ (0 : E), smul, norm_zero, zero_mul] add_le' := add_le smul' := smul neg' x := by rw [← neg_one_smul π•œ, smul, norm_neg, ← smul, one_smul] #align seminorm.of Seminorm.of /-- Alternative constructor for a `Seminorm` over a normed field `π•œ` that only assumes `f 0 = 0` and an inequality for the scalar multiplication. -/ def Seminorm.ofSMulLE [NormedField π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (map_zero : f 0 = 0) (add_le : βˆ€ x y, f (x + y) ≀ f x + f y) (smul_le : βˆ€ (r : π•œ) (x), f (r β€’ x) ≀ β€–rβ€– * f x) : Seminorm π•œ E := Seminorm.of f add_le fun r x => by refine' le_antisymm (smul_le r x) _ by_cases h : r = 0 Β· simp [h, map_zero] rw [← mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))] rw [inv_mul_cancel_leftβ‚€ (norm_ne_zero_iff.mpr h)] specialize smul_le r⁻¹ (r β€’ x) rw [norm_inv] at smul_le convert smul_le simp [h] #align seminorm.of_smul_le Seminorm.ofSMulLE end Of namespace Seminorm section SeminormedRing variable [SeminormedRing π•œ] section AddGroup variable [AddGroup E] section SMul variable [SMul π•œ E] instance instSeminormClass : SeminormClass (Seminorm π•œ E) π•œ E where coe f := f.toFun coe_injective' f g h := by rcases f with ⟨⟨_⟩⟩ rcases g with ⟨⟨_⟩⟩ congr map_zero f := f.map_zero' map_add_le_add f := f.add_le' map_neg_eq_map f := f.neg' map_smul_eq_mul f := f.smul' #align seminorm.seminorm_class Seminorm.instSeminormClass /-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/ instance instCoeFun : CoeFun (Seminorm π•œ E) fun _ => E β†’ ℝ := FunLike.hasCoeToFun @[ext] theorem ext {p q : Seminorm π•œ E} (h : βˆ€ x, (p : E β†’ ℝ) x = q x) : p = q := FunLike.ext p q h #align seminorm.ext Seminorm.ext instance instZero : Zero (Seminorm π•œ E) := ⟨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with smul' := fun _ _ => (mul_zero _).symm }⟩ @[simp] theorem coe_zero : ⇑(0 : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_zero Seminorm.coe_zero @[simp] theorem zero_apply (x : E) : (0 : Seminorm π•œ E) x = 0 := rfl #align seminorm.zero_apply Seminorm.zero_apply instance : Inhabited (Seminorm π•œ E) := ⟨0⟩ variable (p : Seminorm π•œ E) (c : π•œ) (x y : E) (r : ℝ) /-- Any action on `ℝ` which factors through `ℝβ‰₯0` applies to a seminorm. -/ instance instSMul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : SMul R (Seminorm π•œ E) where smul r p := { r β€’ p.toAddGroupSeminorm with toFun := fun x => r β€’ p x smul' := fun _ _ => by simp only [← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul] rw [map_smul_eq_mul, mul_left_comm] } instance [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] [SMul R' ℝ] [SMul R' ℝβ‰₯0] [IsScalarTower R' ℝβ‰₯0 ℝ] [SMul R R'] [IsScalarTower R R' ℝ] : IsScalarTower R R' (Seminorm π•œ E) where smul_assoc r a p := ext fun x => smul_assoc r a (p x) theorem coe_smul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) : ⇑(r β€’ p) = r β€’ ⇑p := rfl #align seminorm.coe_smul Seminorm.coe_smul @[simp] theorem smul_apply [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) (x : E) : (r β€’ p) x = r β€’ p x := rfl #align seminorm.smul_apply Seminorm.smul_apply instance instAdd : Add (Seminorm π•œ E) where add p q := { p.toAddGroupSeminorm + q.toAddGroupSeminorm with toFun := fun x => p x + q x smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] } theorem coe_add (p q : Seminorm π•œ E) : ⇑(p + q) = p + q := rfl #align seminorm.coe_add Seminorm.coe_add @[simp] theorem add_apply (p q : Seminorm π•œ E) (x : E) : (p + q) x = p x + q x := rfl #align seminorm.add_apply Seminorm.add_apply instance instAddMonoid : AddMonoid (Seminorm π•œ E) := FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π•œ E) := FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl instance instMulAction [Monoid R] [MulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : MulAction R (Seminorm π•œ E) := FunLike.coe_injective.mulAction _ (by intros; rfl) variable (π•œ E) /-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π•œ E` is a module. -/ @[simps] def coeFnAddMonoidHom : AddMonoidHom (Seminorm π•œ E) (E β†’ ℝ) where toFun := (↑) map_zero' := coe_zero map_add' := coe_add #align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π•œ E) := show @Function.Injective (Seminorm π•œ E) (E β†’ ℝ) (↑) from FunLike.coe_injective #align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective variable {π•œ E} instance instDistribMulAction [Monoid R] [DistribMulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : DistribMulAction R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).distribMulAction _ (by intros; rfl) instance instModule [Semiring R] [Module R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : Module R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).module R _ (by intros; rfl) instance instSup : Sup (Seminorm π•œ E) where sup p q := { p.toAddGroupSeminorm βŠ” q.toAddGroupSeminorm with toFun := p βŠ” q smul' := fun x v => (congr_argβ‚‚ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <| (mul_max_of_nonneg _ _ <| norm_nonneg x).symm } @[simp] theorem coe_sup (p q : Seminorm π•œ E) : ⇑(p βŠ” q) = (p : E β†’ ℝ) βŠ” (q : E β†’ ℝ) := rfl #align seminorm.coe_sup Seminorm.coe_sup theorem sup_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ” q) x = p x βŠ” q x := rfl #align seminorm.sup_apply Seminorm.sup_apply theorem smul_sup [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ” q) = r β€’ p βŠ” r β€’ q := have real.smul_max : βˆ€ x y : ℝ, r β€’ max x y = max (r β€’ x) (r β€’ y) := fun x y => by simpa only [← smul_eq_mul, ← NNReal.smul_def, smul_one_smul ℝβ‰₯0 r (_ : ℝ)] using mul_max_of_nonneg x y (r β€’ (1 : ℝβ‰₯0) : ℝβ‰₯0).coe_nonneg ext fun x => real.smul_max _ _ #align seminorm.smul_sup Seminorm.smul_sup instance instPartialOrder : PartialOrder (Seminorm π•œ E) := PartialOrder.lift _ FunLike.coe_injective @[simp, norm_cast] theorem coe_le_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) ≀ q ↔ p ≀ q := Iff.rfl #align seminorm.coe_le_coe Seminorm.coe_le_coe @[simp, norm_cast] theorem coe_lt_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) < q ↔ p < q := Iff.rfl #align seminorm.coe_lt_coe Seminorm.coe_lt_coe theorem le_def {p q : Seminorm π•œ E} : p ≀ q ↔ βˆ€ x, p x ≀ q x := Iff.rfl #align seminorm.le_def Seminorm.le_def theorem lt_def {p q : Seminorm π•œ E} : p < q ↔ p ≀ q ∧ βˆƒ x, p x < q x := @Pi.lt_def _ _ _ p q #align seminorm.lt_def Seminorm.lt_def instance instSemilatticeSup : SemilatticeSup (Seminorm π•œ E) := Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup end SMul end AddGroup section Module variable [SeminormedRing π•œβ‚‚] [SeminormedRing π•œβ‚ƒ] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable {σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₂₃] variable {σ₁₃ : π•œ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₁₃] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [AddCommGroup E₃] variable [AddCommGroup F] [AddCommGroup G] variable [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] [Module π•œβ‚ƒ E₃] [Module π•œ F] [Module π•œ G] -- Porting note: even though this instance is found immediately by typeclass search, -- it seems to be needed below!? noncomputable instance smul_nnreal_real : SMul ℝβ‰₯0 ℝ := inferInstance variable [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] /-- Composition of a seminorm with a linear map is a seminorm. -/ def comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œ E := { p.toAddGroupSeminorm.comp f.toAddMonoidHom with toFun := fun x => p (f x) -- Porting note: the `simp only` below used to be part of the `rw`. -- I'm not sure why this change was needed, and am worried by it! smul' := fun _ _ => by simp only [map_smulβ‚›β‚—]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] } #align seminorm.comp Seminorm.comp theorem coe_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : ⇑(p.comp f) = p ∘ f := rfl #align seminorm.coe_comp Seminorm.coe_comp @[simp] theorem comp_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (x : E) : (p.comp f) x = p (f x) := rfl #align seminorm.comp_apply Seminorm.comp_apply @[simp] theorem comp_id (p : Seminorm π•œ E) : p.comp LinearMap.id = p := ext fun _ => rfl #align seminorm.comp_id Seminorm.comp_id @[simp] theorem comp_zero (p : Seminorm π•œβ‚‚ Eβ‚‚) : p.comp (0 : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) = 0 := ext fun _ => map_zero p #align seminorm.comp_zero Seminorm.comp_zero @[simp] theorem zero_comp (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (0 : Seminorm π•œβ‚‚ Eβ‚‚).comp f = 0 := ext fun _ => rfl #align seminorm.zero_comp Seminorm.zero_comp theorem comp_comp [RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] (p : Seminorm π•œβ‚ƒ E₃) (g : Eβ‚‚ β†’β‚›β‚—[σ₂₃] E₃) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (g.comp f) = (p.comp g).comp f := ext fun _ => rfl #align seminorm.comp_comp Seminorm.comp_comp theorem add_comp (p q : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (p + q).comp f = p.comp f + q.comp f := ext fun _ => rfl #align seminorm.add_comp Seminorm.add_comp theorem comp_add_le (p : Seminorm π•œβ‚‚ Eβ‚‚) (f g : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (f + g) ≀ p.comp f + p.comp g := fun _ => map_add_le_add p _ _ #align seminorm.comp_add_le Seminorm.comp_add_le theorem smul_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : R) : (c β€’ p).comp f = c β€’ p.comp f := ext fun _ => rfl #align seminorm.smul_comp Seminorm.smul_comp theorem comp_mono {p q : Seminorm π•œβ‚‚ Eβ‚‚} (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (hp : p ≀ q) : p.comp f ≀ q.comp f := fun _ => hp _ #align seminorm.comp_mono Seminorm.comp_mono /-- The composition as an `AddMonoidHom`. -/ @[simps] def pullback (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œβ‚‚ Eβ‚‚ β†’+ Seminorm π•œ E where toFun := fun p => p.comp f map_zero' := zero_comp f map_add' := fun p q => add_comp p q f #align seminorm.pullback Seminorm.pullback instance instOrderBot : OrderBot (Seminorm π•œ E) where bot := 0 bot_le := map_nonneg @[simp] theorem coe_bot : ⇑(βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_bot Seminorm.coe_bot theorem bot_eq_zero : (βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.bot_eq_zero Seminorm.bot_eq_zero theorem smul_le_smul {p q : Seminorm π•œ E} {a b : ℝβ‰₯0} (hpq : p ≀ q) (hab : a ≀ b) : a β€’ p ≀ b β€’ q := by simp_rw [le_def] intro x exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b) #align seminorm.smul_le_smul Seminorm.smul_le_smul theorem finset_sup_apply (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = ↑(s.sup fun i => ⟨p i x, map_nonneg (p i) x⟩ : ℝβ‰₯0) := by induction' s using Finset.cons_induction_on with a s ha ih Β· rw [Finset.sup_empty, Finset.sup_empty, coe_bot, _root_.bot_eq_zero, Pi.zero_apply] norm_cast Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max, NNReal.coe_max, NNReal.coe_mk, ih] #align seminorm.finset_sup_apply Seminorm.finset_sup_apply theorem exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) : βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.exists_mem_eq_sup s hs (fun i ↦ (⟨p i x, map_nonneg _ _⟩ : ℝβ‰₯0)) with ⟨i, hi, hix⟩ rw [finset_sup_apply] exact ⟨i, hi, congr_arg _ hix⟩ theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = 0 ∨ βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.eq_empty_or_nonempty s with (rfl|hs) Β· left; rfl Β· right; exact exists_apply_eq_finset_sup p hs x theorem finset_sup_smul (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (C : ℝβ‰₯0) : s.sup (C β€’ p) = C β€’ s.sup p := by ext x rw [smul_apply, finset_sup_apply, finset_sup_apply] symm exact congr_arg ((↑) : ℝβ‰₯0 β†’ ℝ) (NNReal.mul_finset_sup C s (fun i ↦ ⟨p i x, map_nonneg _ _⟩)) theorem finset_sup_le_sum (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) : s.sup p ≀ βˆ‘ i in s, p i := by classical refine' Finset.sup_le_iff.mpr _ intro i hi rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left] exact bot_le #align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum theorem finset_sup_apply_le {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 ≀ a) (h : βˆ€ i, i ∈ s β†’ p i x ≀ a) : s.sup p x ≀ a := by lift a to ℝβ‰₯0 using ha rw [finset_sup_apply, NNReal.coe_le_coe] exact Finset.sup_le h #align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le theorem le_finset_sup_apply {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {i : ΞΉ} (hi : i ∈ s) : p i x ≀ s.sup p x := (Finset.le_sup hi : p i ≀ s.sup p) x theorem finset_sup_apply_lt {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 < a) (h : βˆ€ i, i ∈ s β†’ p i x < a) : s.sup p x < a := by lift a to ℝβ‰₯0 using ha.le rw [finset_sup_apply, NNReal.coe_lt_coe, Finset.sup_lt_iff] Β· exact h Β· exact NNReal.coe_pos.mpr ha #align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt theorem norm_sub_map_le_sub (p : Seminorm π•œ E) (x y : E) : β€–p x - p yβ€– ≀ p (x - y) := abs_sub_map_le_sub p x y #align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub end Module end SeminormedRing section SeminormedCommRing variable [SeminormedRing π•œ] [SeminormedCommRing π•œβ‚‚] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] theorem comp_smul (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) : p.comp (c β€’ f) = β€–cβ€–β‚Š β€’ p.comp f := ext fun _ => by rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm, smul_eq_mul, comp_apply] #align seminorm.comp_smul Seminorm.comp_smul theorem comp_smul_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) (x : E) : p.comp (c β€’ f) x = β€–cβ€– * p (f x) := map_smul_eq_mul p _ _ #align seminorm.comp_smul_apply Seminorm.comp_smul_apply end SeminormedCommRing section NormedField variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] {p q : Seminorm π•œ E} {x : E} /-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/ theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) := ⟨0, by rintro _ ⟨x, rfl⟩ dsimp; positivity⟩ #align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add noncomputable instance instInf : Inf (Seminorm π•œ E) where inf p q := { p.toAddGroupSeminorm βŠ“ q.toAddGroupSeminorm with toFun := fun x => β¨… u : E, p u + q (x - u) smul' := by intro a x obtain rfl | ha := eq_or_ne a 0 Β· rw [norm_zero, zero_mul, zero_smul] refine' ciInf_eq_of_forall_ge_of_forall_gt_exists_lt -- Porting note: the following was previously `fun i => by positivity` (fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _)) fun x hx => ⟨0, by rwa [map_zero, sub_zero, map_zero, add_zero]⟩ simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, ← map_smul_eq_mul p, ← map_smul_eq_mul q, smul_sub] refine' Function.Surjective.iInf_congr ((a⁻¹ β€’ Β·) : E β†’ E) (fun u => ⟨a β€’ u, inv_smul_smulβ‚€ ha u⟩) fun u => _ rw [smul_inv_smulβ‚€ ha] } @[simp] theorem inf_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ“ q) x = β¨… u : E, p u + q (x - u) := rfl #align seminorm.inf_apply Seminorm.inf_apply noncomputable instance instLattice : Lattice (Seminorm π•œ E) := { Seminorm.instSemilatticeSup with inf := (Β· βŠ“ Β·) inf_le_left := fun p q x => ciInf_le_of_le bddBelow_range_add x <| by simp only [sub_self, map_zero, add_zero]; rfl inf_le_right := fun p q x => ciInf_le_of_le bddBelow_range_add 0 <| by simp only [sub_self, map_zero, zero_add, sub_zero]; rfl le_inf := fun a b c hab hac x => le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) } theorem smul_inf [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ“ q) = r β€’ p βŠ“ r β€’ q := by ext simp_rw [smul_apply, inf_apply, smul_apply, ← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add] #align seminorm.smul_inf Seminorm.smul_inf section Classical open Classical /-- We define the supremum of an arbitrary subset of `Seminorm π•œ E` as follows: * if `s` is `BddAbove` *as a set of functions `E β†’ ℝ`* (that is, if `s` is pointwise bounded above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a seminorm. * otherwise, we take the zero seminorm `βŠ₯`. There are two things worth mentioning here: * First, it is not trivial at first that `s` being bounded above *by a function* implies being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make the case disjunction on `BddAbove ((↑) '' s : Set (E β†’ ℝ))` and not `BddAbove s`. * Since the pointwise `Sup` already gives `0` at points where a family of functions is not bounded above, one could hope that just using the pointwise `Sup` would work here, without the need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can give a function which does *not* satisfy the seminorm axioms (typically sub-additivity). -/ noncomputable instance instSupSet : SupSet (Seminorm π•œ E) where sSup s := if h : BddAbove ((↑) '' s : Set (E β†’ ℝ)) then { toFun := ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) map_zero' := by rw [iSup_apply, ← @Real.ciSup_const_zero s] congr! rename_i _ _ _ i exact map_zero i.1 add_le' := fun x y => by rcases h with ⟨q, hq⟩ obtain rfl | h := s.eq_empty_or_nonempty Β· simp [Real.ciSup_empty] haveI : Nonempty ↑s := h.coe_sort simp only [iSup_apply] refine' ciSup_le fun i => ((i : Seminorm π•œ E).add_le' x y).trans <| add_le_add -- Porting note: `f` is provided to force `Subtype.val` to appear. -- A type ascription on `_` would have also worked, but would have been more verbose. (le_ciSup (f := fun i => (Subtype.val i : Seminorm π•œ E).toFun x) ⟨q x, _⟩ i) (le_ciSup (f := fun i => (Subtype.val i : Seminorm π•œ E).toFun y) ⟨q y, _⟩ i) <;> rw [mem_upperBounds, forall_range_iff] <;> exact fun j => hq (mem_image_of_mem _ j.2) _ neg' := fun x => by simp only [iSup_apply] congr! 2 rename_i _ _ _ i exact i.1.neg' _ smul' := fun a x => by
simp only [iSup_apply]
/-- 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
Mathlib.Analysis.Seminorm.537_0.ywwMCgoKeIFKDZ3
/-- 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
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 x✝ : E s : Set (Seminorm π•œ E) h : BddAbove (FunLike.coe '' s) a : π•œ x : E ⊒ ⨆ i, ↑i (a β€’ x) = β€–aβ€– * ⨆ i, ↑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]
/-- 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]
Mathlib.Analysis.Seminorm.537_0.ywwMCgoKeIFKDZ3
/-- 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
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 x✝ : E s : Set (Seminorm π•œ E) h : BddAbove (FunLike.coe '' s) a : π•œ x : E ⊒ ⨆ i, ↑i (a β€’ x) = ⨆ i, β€–aβ€– β€’ ↑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!
/-- 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]
Mathlib.Analysis.Seminorm.537_0.ywwMCgoKeIFKDZ3
/-- 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
Mathlib_Analysis_Seminorm
case h.e'_4.h R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p q : Seminorm π•œ E x✝¹ : E s : Set (Seminorm π•œ E) h : BddAbove (FunLike.coe '' s) a : π•œ x : E x✝ : ↑s ⊒ ↑x✝ (a β€’ x) = β€–aβ€– β€’ ↑x✝ x
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, YaΓ«l Dillies, Moritz Doll -/ import Mathlib.Data.Real.Pointwise import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.LocallyConvex.Basic import Mathlib.Analysis.Normed.Group.AddTorsor #align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c" /-! # Seminorms This file defines seminorms. A seminorm is a function to the reals which is positive-semidefinite, absolutely homogeneous, and subadditive. They are closely related to convex sets, and a topological vector space is locally convex if and only if its topology is induced by a family of seminorms. ## Main declarations For a module over a normed ring: * `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and subadditive. * `normSeminorm π•œ E`: The norm on `E` as a seminorm. ## References * [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966] ## Tags seminorm, locally convex, LCTVS -/ set_option autoImplicit true open NormedField Set Filter open scoped BigOperators NNReal Pointwise Topology Uniformity variable {R R' π•œ π•œβ‚‚ π•œβ‚ƒ 𝕝 E Eβ‚‚ E₃ F G ΞΉ : Type*} /-- A seminorm on a module over a normed ring is a function to the reals that is positive semidefinite, positive homogeneous, and subadditive. -/ structure Seminorm (π•œ : Type*) (E : Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminorm E where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ smul' : βˆ€ (a : π•œ) (x : E), toFun (a β€’ x) = β€–aβ€– * toFun x #align seminorm Seminorm attribute [nolint docBlame] Seminorm.toAddGroupSeminorm /-- `SeminormClass F π•œ E` states that `F` is a type of seminorms on the `π•œ`-module `E`. You should extend this class when you extend `Seminorm`. -/ class SeminormClass (F : Type*) (π•œ E : outParam <| Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminormClass F E ℝ where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ map_smul_eq_mul (f : F) (a : π•œ) (x : E) : f (a β€’ x) = β€–aβ€– * f x #align seminorm_class SeminormClass export SeminormClass (map_smul_eq_mul) -- Porting note: dangerous instances no longer exist -- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass section Of /-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a `SeminormedRing π•œ`. -/ def Seminorm.of [SeminormedRing π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (add_le : βˆ€ x y : E, f (x + y) ≀ f x + f y) (smul : βˆ€ (a : π•œ) (x : E), f (a β€’ x) = β€–aβ€– * f x) : Seminorm π•œ E where toFun := f map_zero' := by rw [← zero_smul π•œ (0 : E), smul, norm_zero, zero_mul] add_le' := add_le smul' := smul neg' x := by rw [← neg_one_smul π•œ, smul, norm_neg, ← smul, one_smul] #align seminorm.of Seminorm.of /-- Alternative constructor for a `Seminorm` over a normed field `π•œ` that only assumes `f 0 = 0` and an inequality for the scalar multiplication. -/ def Seminorm.ofSMulLE [NormedField π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (map_zero : f 0 = 0) (add_le : βˆ€ x y, f (x + y) ≀ f x + f y) (smul_le : βˆ€ (r : π•œ) (x), f (r β€’ x) ≀ β€–rβ€– * f x) : Seminorm π•œ E := Seminorm.of f add_le fun r x => by refine' le_antisymm (smul_le r x) _ by_cases h : r = 0 Β· simp [h, map_zero] rw [← mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))] rw [inv_mul_cancel_leftβ‚€ (norm_ne_zero_iff.mpr h)] specialize smul_le r⁻¹ (r β€’ x) rw [norm_inv] at smul_le convert smul_le simp [h] #align seminorm.of_smul_le Seminorm.ofSMulLE end Of namespace Seminorm section SeminormedRing variable [SeminormedRing π•œ] section AddGroup variable [AddGroup E] section SMul variable [SMul π•œ E] instance instSeminormClass : SeminormClass (Seminorm π•œ E) π•œ E where coe f := f.toFun coe_injective' f g h := by rcases f with ⟨⟨_⟩⟩ rcases g with ⟨⟨_⟩⟩ congr map_zero f := f.map_zero' map_add_le_add f := f.add_le' map_neg_eq_map f := f.neg' map_smul_eq_mul f := f.smul' #align seminorm.seminorm_class Seminorm.instSeminormClass /-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/ instance instCoeFun : CoeFun (Seminorm π•œ E) fun _ => E β†’ ℝ := FunLike.hasCoeToFun @[ext] theorem ext {p q : Seminorm π•œ E} (h : βˆ€ x, (p : E β†’ ℝ) x = q x) : p = q := FunLike.ext p q h #align seminorm.ext Seminorm.ext instance instZero : Zero (Seminorm π•œ E) := ⟨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with smul' := fun _ _ => (mul_zero _).symm }⟩ @[simp] theorem coe_zero : ⇑(0 : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_zero Seminorm.coe_zero @[simp] theorem zero_apply (x : E) : (0 : Seminorm π•œ E) x = 0 := rfl #align seminorm.zero_apply Seminorm.zero_apply instance : Inhabited (Seminorm π•œ E) := ⟨0⟩ variable (p : Seminorm π•œ E) (c : π•œ) (x y : E) (r : ℝ) /-- Any action on `ℝ` which factors through `ℝβ‰₯0` applies to a seminorm. -/ instance instSMul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : SMul R (Seminorm π•œ E) where smul r p := { r β€’ p.toAddGroupSeminorm with toFun := fun x => r β€’ p x smul' := fun _ _ => by simp only [← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul] rw [map_smul_eq_mul, mul_left_comm] } instance [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] [SMul R' ℝ] [SMul R' ℝβ‰₯0] [IsScalarTower R' ℝβ‰₯0 ℝ] [SMul R R'] [IsScalarTower R R' ℝ] : IsScalarTower R R' (Seminorm π•œ E) where smul_assoc r a p := ext fun x => smul_assoc r a (p x) theorem coe_smul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) : ⇑(r β€’ p) = r β€’ ⇑p := rfl #align seminorm.coe_smul Seminorm.coe_smul @[simp] theorem smul_apply [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) (x : E) : (r β€’ p) x = r β€’ p x := rfl #align seminorm.smul_apply Seminorm.smul_apply instance instAdd : Add (Seminorm π•œ E) where add p q := { p.toAddGroupSeminorm + q.toAddGroupSeminorm with toFun := fun x => p x + q x smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] } theorem coe_add (p q : Seminorm π•œ E) : ⇑(p + q) = p + q := rfl #align seminorm.coe_add Seminorm.coe_add @[simp] theorem add_apply (p q : Seminorm π•œ E) (x : E) : (p + q) x = p x + q x := rfl #align seminorm.add_apply Seminorm.add_apply instance instAddMonoid : AddMonoid (Seminorm π•œ E) := FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π•œ E) := FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl instance instMulAction [Monoid R] [MulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : MulAction R (Seminorm π•œ E) := FunLike.coe_injective.mulAction _ (by intros; rfl) variable (π•œ E) /-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π•œ E` is a module. -/ @[simps] def coeFnAddMonoidHom : AddMonoidHom (Seminorm π•œ E) (E β†’ ℝ) where toFun := (↑) map_zero' := coe_zero map_add' := coe_add #align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π•œ E) := show @Function.Injective (Seminorm π•œ E) (E β†’ ℝ) (↑) from FunLike.coe_injective #align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective variable {π•œ E} instance instDistribMulAction [Monoid R] [DistribMulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : DistribMulAction R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).distribMulAction _ (by intros; rfl) instance instModule [Semiring R] [Module R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : Module R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).module R _ (by intros; rfl) instance instSup : Sup (Seminorm π•œ E) where sup p q := { p.toAddGroupSeminorm βŠ” q.toAddGroupSeminorm with toFun := p βŠ” q smul' := fun x v => (congr_argβ‚‚ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <| (mul_max_of_nonneg _ _ <| norm_nonneg x).symm } @[simp] theorem coe_sup (p q : Seminorm π•œ E) : ⇑(p βŠ” q) = (p : E β†’ ℝ) βŠ” (q : E β†’ ℝ) := rfl #align seminorm.coe_sup Seminorm.coe_sup theorem sup_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ” q) x = p x βŠ” q x := rfl #align seminorm.sup_apply Seminorm.sup_apply theorem smul_sup [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ” q) = r β€’ p βŠ” r β€’ q := have real.smul_max : βˆ€ x y : ℝ, r β€’ max x y = max (r β€’ x) (r β€’ y) := fun x y => by simpa only [← smul_eq_mul, ← NNReal.smul_def, smul_one_smul ℝβ‰₯0 r (_ : ℝ)] using mul_max_of_nonneg x y (r β€’ (1 : ℝβ‰₯0) : ℝβ‰₯0).coe_nonneg ext fun x => real.smul_max _ _ #align seminorm.smul_sup Seminorm.smul_sup instance instPartialOrder : PartialOrder (Seminorm π•œ E) := PartialOrder.lift _ FunLike.coe_injective @[simp, norm_cast] theorem coe_le_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) ≀ q ↔ p ≀ q := Iff.rfl #align seminorm.coe_le_coe Seminorm.coe_le_coe @[simp, norm_cast] theorem coe_lt_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) < q ↔ p < q := Iff.rfl #align seminorm.coe_lt_coe Seminorm.coe_lt_coe theorem le_def {p q : Seminorm π•œ E} : p ≀ q ↔ βˆ€ x, p x ≀ q x := Iff.rfl #align seminorm.le_def Seminorm.le_def theorem lt_def {p q : Seminorm π•œ E} : p < q ↔ p ≀ q ∧ βˆƒ x, p x < q x := @Pi.lt_def _ _ _ p q #align seminorm.lt_def Seminorm.lt_def instance instSemilatticeSup : SemilatticeSup (Seminorm π•œ E) := Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup end SMul end AddGroup section Module variable [SeminormedRing π•œβ‚‚] [SeminormedRing π•œβ‚ƒ] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable {σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₂₃] variable {σ₁₃ : π•œ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₁₃] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [AddCommGroup E₃] variable [AddCommGroup F] [AddCommGroup G] variable [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] [Module π•œβ‚ƒ E₃] [Module π•œ F] [Module π•œ G] -- Porting note: even though this instance is found immediately by typeclass search, -- it seems to be needed below!? noncomputable instance smul_nnreal_real : SMul ℝβ‰₯0 ℝ := inferInstance variable [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] /-- Composition of a seminorm with a linear map is a seminorm. -/ def comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œ E := { p.toAddGroupSeminorm.comp f.toAddMonoidHom with toFun := fun x => p (f x) -- Porting note: the `simp only` below used to be part of the `rw`. -- I'm not sure why this change was needed, and am worried by it! smul' := fun _ _ => by simp only [map_smulβ‚›β‚—]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] } #align seminorm.comp Seminorm.comp theorem coe_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : ⇑(p.comp f) = p ∘ f := rfl #align seminorm.coe_comp Seminorm.coe_comp @[simp] theorem comp_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (x : E) : (p.comp f) x = p (f x) := rfl #align seminorm.comp_apply Seminorm.comp_apply @[simp] theorem comp_id (p : Seminorm π•œ E) : p.comp LinearMap.id = p := ext fun _ => rfl #align seminorm.comp_id Seminorm.comp_id @[simp] theorem comp_zero (p : Seminorm π•œβ‚‚ Eβ‚‚) : p.comp (0 : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) = 0 := ext fun _ => map_zero p #align seminorm.comp_zero Seminorm.comp_zero @[simp] theorem zero_comp (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (0 : Seminorm π•œβ‚‚ Eβ‚‚).comp f = 0 := ext fun _ => rfl #align seminorm.zero_comp Seminorm.zero_comp theorem comp_comp [RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] (p : Seminorm π•œβ‚ƒ E₃) (g : Eβ‚‚ β†’β‚›β‚—[σ₂₃] E₃) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (g.comp f) = (p.comp g).comp f := ext fun _ => rfl #align seminorm.comp_comp Seminorm.comp_comp theorem add_comp (p q : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (p + q).comp f = p.comp f + q.comp f := ext fun _ => rfl #align seminorm.add_comp Seminorm.add_comp theorem comp_add_le (p : Seminorm π•œβ‚‚ Eβ‚‚) (f g : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (f + g) ≀ p.comp f + p.comp g := fun _ => map_add_le_add p _ _ #align seminorm.comp_add_le Seminorm.comp_add_le theorem smul_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : R) : (c β€’ p).comp f = c β€’ p.comp f := ext fun _ => rfl #align seminorm.smul_comp Seminorm.smul_comp theorem comp_mono {p q : Seminorm π•œβ‚‚ Eβ‚‚} (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (hp : p ≀ q) : p.comp f ≀ q.comp f := fun _ => hp _ #align seminorm.comp_mono Seminorm.comp_mono /-- The composition as an `AddMonoidHom`. -/ @[simps] def pullback (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œβ‚‚ Eβ‚‚ β†’+ Seminorm π•œ E where toFun := fun p => p.comp f map_zero' := zero_comp f map_add' := fun p q => add_comp p q f #align seminorm.pullback Seminorm.pullback instance instOrderBot : OrderBot (Seminorm π•œ E) where bot := 0 bot_le := map_nonneg @[simp] theorem coe_bot : ⇑(βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_bot Seminorm.coe_bot theorem bot_eq_zero : (βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.bot_eq_zero Seminorm.bot_eq_zero theorem smul_le_smul {p q : Seminorm π•œ E} {a b : ℝβ‰₯0} (hpq : p ≀ q) (hab : a ≀ b) : a β€’ p ≀ b β€’ q := by simp_rw [le_def] intro x exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b) #align seminorm.smul_le_smul Seminorm.smul_le_smul theorem finset_sup_apply (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = ↑(s.sup fun i => ⟨p i x, map_nonneg (p i) x⟩ : ℝβ‰₯0) := by induction' s using Finset.cons_induction_on with a s ha ih Β· rw [Finset.sup_empty, Finset.sup_empty, coe_bot, _root_.bot_eq_zero, Pi.zero_apply] norm_cast Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max, NNReal.coe_max, NNReal.coe_mk, ih] #align seminorm.finset_sup_apply Seminorm.finset_sup_apply theorem exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) : βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.exists_mem_eq_sup s hs (fun i ↦ (⟨p i x, map_nonneg _ _⟩ : ℝβ‰₯0)) with ⟨i, hi, hix⟩ rw [finset_sup_apply] exact ⟨i, hi, congr_arg _ hix⟩ theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = 0 ∨ βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.eq_empty_or_nonempty s with (rfl|hs) Β· left; rfl Β· right; exact exists_apply_eq_finset_sup p hs x theorem finset_sup_smul (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (C : ℝβ‰₯0) : s.sup (C β€’ p) = C β€’ s.sup p := by ext x rw [smul_apply, finset_sup_apply, finset_sup_apply] symm exact congr_arg ((↑) : ℝβ‰₯0 β†’ ℝ) (NNReal.mul_finset_sup C s (fun i ↦ ⟨p i x, map_nonneg _ _⟩)) theorem finset_sup_le_sum (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) : s.sup p ≀ βˆ‘ i in s, p i := by classical refine' Finset.sup_le_iff.mpr _ intro i hi rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left] exact bot_le #align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum theorem finset_sup_apply_le {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 ≀ a) (h : βˆ€ i, i ∈ s β†’ p i x ≀ a) : s.sup p x ≀ a := by lift a to ℝβ‰₯0 using ha rw [finset_sup_apply, NNReal.coe_le_coe] exact Finset.sup_le h #align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le theorem le_finset_sup_apply {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {i : ΞΉ} (hi : i ∈ s) : p i x ≀ s.sup p x := (Finset.le_sup hi : p i ≀ s.sup p) x theorem finset_sup_apply_lt {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 < a) (h : βˆ€ i, i ∈ s β†’ p i x < a) : s.sup p x < a := by lift a to ℝβ‰₯0 using ha.le rw [finset_sup_apply, NNReal.coe_lt_coe, Finset.sup_lt_iff] Β· exact h Β· exact NNReal.coe_pos.mpr ha #align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt theorem norm_sub_map_le_sub (p : Seminorm π•œ E) (x y : E) : β€–p x - p yβ€– ≀ p (x - y) := abs_sub_map_le_sub p x y #align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub end Module end SeminormedRing section SeminormedCommRing variable [SeminormedRing π•œ] [SeminormedCommRing π•œβ‚‚] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] theorem comp_smul (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) : p.comp (c β€’ f) = β€–cβ€–β‚Š β€’ p.comp f := ext fun _ => by rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm, smul_eq_mul, comp_apply] #align seminorm.comp_smul Seminorm.comp_smul theorem comp_smul_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) (x : E) : p.comp (c β€’ f) x = β€–cβ€– * p (f x) := map_smul_eq_mul p _ _ #align seminorm.comp_smul_apply Seminorm.comp_smul_apply end SeminormedCommRing section NormedField variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] {p q : Seminorm π•œ E} {x : E} /-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/ theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) := ⟨0, by rintro _ ⟨x, rfl⟩ dsimp; positivity⟩ #align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add noncomputable instance instInf : Inf (Seminorm π•œ E) where inf p q := { p.toAddGroupSeminorm βŠ“ q.toAddGroupSeminorm with toFun := fun x => β¨… u : E, p u + q (x - u) smul' := by intro a x obtain rfl | ha := eq_or_ne a 0 Β· rw [norm_zero, zero_mul, zero_smul] refine' ciInf_eq_of_forall_ge_of_forall_gt_exists_lt -- Porting note: the following was previously `fun i => by positivity` (fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _)) fun x hx => ⟨0, by rwa [map_zero, sub_zero, map_zero, add_zero]⟩ simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, ← map_smul_eq_mul p, ← map_smul_eq_mul q, smul_sub] refine' Function.Surjective.iInf_congr ((a⁻¹ β€’ Β·) : E β†’ E) (fun u => ⟨a β€’ u, inv_smul_smulβ‚€ ha u⟩) fun u => _ rw [smul_inv_smulβ‚€ ha] } @[simp] theorem inf_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ“ q) x = β¨… u : E, p u + q (x - u) := rfl #align seminorm.inf_apply Seminorm.inf_apply noncomputable instance instLattice : Lattice (Seminorm π•œ E) := { Seminorm.instSemilatticeSup with inf := (Β· βŠ“ Β·) inf_le_left := fun p q x => ciInf_le_of_le bddBelow_range_add x <| by simp only [sub_self, map_zero, add_zero]; rfl inf_le_right := fun p q x => ciInf_le_of_le bddBelow_range_add 0 <| by simp only [sub_self, map_zero, zero_add, sub_zero]; rfl le_inf := fun a b c hab hac x => le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) } theorem smul_inf [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ“ q) = r β€’ p βŠ“ r β€’ q := by ext simp_rw [smul_apply, inf_apply, smul_apply, ← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add] #align seminorm.smul_inf Seminorm.smul_inf section Classical open Classical /-- We define the supremum of an arbitrary subset of `Seminorm π•œ E` as follows: * if `s` is `BddAbove` *as a set of functions `E β†’ ℝ`* (that is, if `s` is pointwise bounded above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a seminorm. * otherwise, we take the zero seminorm `βŠ₯`. There are two things worth mentioning here: * First, it is not trivial at first that `s` being bounded above *by a function* implies being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make the case disjunction on `BddAbove ((↑) '' s : Set (E β†’ ℝ))` and not `BddAbove s`. * Since the pointwise `Sup` already gives `0` at points where a family of functions is not bounded above, one could hope that just using the pointwise `Sup` would work here, without the need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can give a function which does *not* satisfy the seminorm axioms (typically sub-additivity). -/ noncomputable instance instSupSet : SupSet (Seminorm π•œ E) where sSup s := if h : BddAbove ((↑) '' s : Set (E β†’ ℝ)) then { toFun := ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) map_zero' := by rw [iSup_apply, ← @Real.ciSup_const_zero s] congr! rename_i _ _ _ i exact map_zero i.1 add_le' := fun x y => by rcases h with ⟨q, hq⟩ obtain rfl | h := s.eq_empty_or_nonempty Β· simp [Real.ciSup_empty] haveI : Nonempty ↑s := h.coe_sort simp only [iSup_apply] refine' ciSup_le fun i => ((i : Seminorm π•œ E).add_le' x y).trans <| add_le_add -- Porting note: `f` is provided to force `Subtype.val` to appear. -- A type ascription on `_` would have also worked, but would have been more verbose. (le_ciSup (f := fun i => (Subtype.val i : Seminorm π•œ E).toFun x) ⟨q x, _⟩ i) (le_ciSup (f := fun i => (Subtype.val i : Seminorm π•œ E).toFun y) ⟨q y, _⟩ i) <;> rw [mem_upperBounds, forall_range_iff] <;> exact fun j => hq (mem_image_of_mem _ j.2) _ neg' := fun x => by simp only [iSup_apply] congr! 2 rename_i _ _ _ i exact i.1.neg' _ smul' := fun a x => by simp only [iSup_apply] rw [← smul_eq_mul, Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π•œ E) x] congr!
rename_i _ _ _ i
/-- 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!
Mathlib.Analysis.Seminorm.537_0.ywwMCgoKeIFKDZ3
/-- 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
Mathlib_Analysis_Seminorm
case h.e'_4.h R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p q : Seminorm π•œ E x✝ : E s : Set (Seminorm π•œ E) h : BddAbove (FunLike.coe '' s) a : π•œ x : E i : ↑s ⊒ ↑i (a β€’ x) = β€–aβ€– β€’ ↑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
/-- 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
Mathlib.Analysis.Seminorm.537_0.ywwMCgoKeIFKDZ3
/-- 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
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 x✝ : E s : Set (Seminorm π•œ E) H : BddAbove (FunLike.coe '' s) p : Seminorm π•œ E hp : p ∈ s x : E ⊒ (fun f => ⇑f) p x ≀ (fun f => ⇑f) (sSup s) 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
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
Mathlib.Analysis.Seminorm.595_0.ywwMCgoKeIFKDZ3
protected theorem bddAbove_iff {s : Set <| Seminorm π•œ E} : BddAbove s ↔ BddAbove ((↑) '' s : Set (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✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p✝ q : Seminorm π•œ E x✝ : E s : Set (Seminorm π•œ E) H : BddAbove (FunLike.coe '' s) p : Seminorm π•œ E hp : p ∈ s x : E ⊒ p x ≀ (sSup s) 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]
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
Mathlib.Analysis.Seminorm.595_0.ywwMCgoKeIFKDZ3
protected theorem bddAbove_iff {s : Set <| Seminorm π•œ E} : BddAbove s ↔ BddAbove ((↑) '' s : Set (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✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p✝ q : Seminorm π•œ E x✝ : E s : Set (Seminorm π•œ E) H : BddAbove (FunLike.coe '' s) p : Seminorm π•œ E hp : p ∈ s x : E ⊒ p x ≀ ⨆ i, ↑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⟩
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]
Mathlib.Analysis.Seminorm.595_0.ywwMCgoKeIFKDZ3
protected theorem bddAbove_iff {s : Set <| Seminorm π•œ E} : BddAbove s ↔ BddAbove ((↑) '' s : Set (E β†’ ℝ))
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✝ q✝ : Seminorm π•œ E x✝ : E s : Set (Seminorm π•œ E) p : Seminorm π•œ E hp : p ∈ s x : E q : E β†’ ℝ hq : q ∈ upperBounds (FunLike.coe '' s) ⊒ p x ≀ ⨆ i, ↑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⟩
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⟩
Mathlib.Analysis.Seminorm.595_0.ywwMCgoKeIFKDZ3
protected theorem bddAbove_iff {s : Set <| Seminorm π•œ E} : BddAbove s ↔ BddAbove ((↑) '' s : Set (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✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p✝ q : Seminorm π•œ E x : E p : ΞΉ β†’ Seminorm π•œ E ⊒ BddAbove (range p) ↔ βˆ€ (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]
protected theorem bddAbove_range_iff {p : ΞΉ β†’ Seminorm π•œ E} : BddAbove (range p) ↔ βˆ€ x, BddAbove (range fun i ↦ p i x) := by
Mathlib.Analysis.Seminorm.606_0.ywwMCgoKeIFKDZ3
protected theorem bddAbove_range_iff {p : ΞΉ β†’ Seminorm π•œ E} : BddAbove (range p) ↔ βˆ€ x, BddAbove (range fun i ↦ p i 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 x : E p : ΞΉ β†’ Seminorm π•œ E ⊒ (βˆ€ (a : E), BddAbove (range fun i => (FunLike.coe ∘ p) i a)) ↔ βˆ€ (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 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];
Mathlib.Analysis.Seminorm.606_0.ywwMCgoKeIFKDZ3
protected theorem bddAbove_range_iff {p : ΞΉ β†’ Seminorm π•œ E} : BddAbove (range p) ↔ βˆ€ x, BddAbove (range fun i ↦ p i 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 x : E ΞΉ : Type u_13 p : ΞΉ β†’ Seminorm π•œ E hp : BddAbove (range p) ⊒ ⇑(⨆ i, p i) = ⨆ i, ⇑(p 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]
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β†’ Seminorm π•œ E} (hp : BddAbove (range p)) : ↑(⨆ i, p i) = ⨆ i, ((p i : Seminorm π•œ E) : E β†’ ℝ) := by
Mathlib.Analysis.Seminorm.615_0.ywwMCgoKeIFKDZ3
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β†’ Seminorm π•œ E} (hp : BddAbove (range p)) : ↑(⨆ i, p i) = ⨆ i, ((p i : Seminorm π•œ E) : 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✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p✝ q : Seminorm π•œ E x : E ΞΉ : Type u_13 p : ΞΉ β†’ Seminorm π•œ E hp : BddAbove (range p) ⊒ ⨆ p_1, ⇑↑p_1 = ⨆ i, ⇑(p 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
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]
Mathlib.Analysis.Seminorm.615_0.ywwMCgoKeIFKDZ3
protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β†’ Seminorm π•œ E} (hp : BddAbove (range p)) : ↑(⨆ i, p i) = ⨆ i, ((p i : Seminorm π•œ E) : 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✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p q : Seminorm π•œ E x✝ : E s : Set (Seminorm π•œ E) hp : BddAbove s x : E ⊒ (sSup s) x = ⨆ p, ↑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 sSup_apply {s : Set (Seminorm π•œ E)} (hp : BddAbove s) {x : E} : (sSup s) x = ⨆ p : s, (p : E β†’ ℝ) x := by
Mathlib.Analysis.Seminorm.621_0.ywwMCgoKeIFKDZ3
protected theorem sSup_apply {s : Set (Seminorm π•œ E)} (hp : BddAbove s) {x : E} : (sSup s) x = ⨆ p : s, (p : E β†’ ℝ) 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 x✝ : E ΞΉ : Type u_13 p : ΞΉ β†’ Seminorm π•œ E hp : BddAbove (range p) x : E ⊒ (⨆ i, p i) x = ⨆ 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 iSup_apply {ΞΉ : Type*} {p : ΞΉ β†’ Seminorm π•œ E} (hp : BddAbove (range p)) {x : E} : (⨆ i, p i) x = ⨆ i, p i x := by
Mathlib.Analysis.Seminorm.625_0.ywwMCgoKeIFKDZ3
protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β†’ Seminorm π•œ E} (hp : BddAbove (range p)) {x : E} : (⨆ i, p i) x = ⨆ i, p i 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 x : E ⊒ sSup βˆ… = βŠ₯
/- 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
protected theorem sSup_empty : sSup (βˆ… : Set (Seminorm π•œ E)) = βŠ₯ := by
Mathlib.Analysis.Seminorm.629_0.ywwMCgoKeIFKDZ3
protected theorem sSup_empty : sSup (βˆ… : Set (Seminorm π•œ E)) = βŠ₯
Mathlib_Analysis_Seminorm
case h R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p q : Seminorm π•œ E x x✝ : E ⊒ (sSup βˆ…) x✝ = βŠ₯ x✝
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, YaΓ«l Dillies, Moritz Doll -/ import Mathlib.Data.Real.Pointwise import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.LocallyConvex.Basic import Mathlib.Analysis.Normed.Group.AddTorsor #align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c" /-! # Seminorms This file defines seminorms. A seminorm is a function to the reals which is positive-semidefinite, absolutely homogeneous, and subadditive. They are closely related to convex sets, and a topological vector space is locally convex if and only if its topology is induced by a family of seminorms. ## Main declarations For a module over a normed ring: * `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and subadditive. * `normSeminorm π•œ E`: The norm on `E` as a seminorm. ## References * [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966] ## Tags seminorm, locally convex, LCTVS -/ set_option autoImplicit true open NormedField Set Filter open scoped BigOperators NNReal Pointwise Topology Uniformity variable {R R' π•œ π•œβ‚‚ π•œβ‚ƒ 𝕝 E Eβ‚‚ E₃ F G ΞΉ : Type*} /-- A seminorm on a module over a normed ring is a function to the reals that is positive semidefinite, positive homogeneous, and subadditive. -/ structure Seminorm (π•œ : Type*) (E : Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminorm E where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ smul' : βˆ€ (a : π•œ) (x : E), toFun (a β€’ x) = β€–aβ€– * toFun x #align seminorm Seminorm attribute [nolint docBlame] Seminorm.toAddGroupSeminorm /-- `SeminormClass F π•œ E` states that `F` is a type of seminorms on the `π•œ`-module `E`. You should extend this class when you extend `Seminorm`. -/ class SeminormClass (F : Type*) (π•œ E : outParam <| Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminormClass F E ℝ where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ map_smul_eq_mul (f : F) (a : π•œ) (x : E) : f (a β€’ x) = β€–aβ€– * f x #align seminorm_class SeminormClass export SeminormClass (map_smul_eq_mul) -- Porting note: dangerous instances no longer exist -- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass section Of /-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a `SeminormedRing π•œ`. -/ def Seminorm.of [SeminormedRing π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (add_le : βˆ€ x y : E, f (x + y) ≀ f x + f y) (smul : βˆ€ (a : π•œ) (x : E), f (a β€’ x) = β€–aβ€– * f x) : Seminorm π•œ E where toFun := f map_zero' := by rw [← zero_smul π•œ (0 : E), smul, norm_zero, zero_mul] add_le' := add_le smul' := smul neg' x := by rw [← neg_one_smul π•œ, smul, norm_neg, ← smul, one_smul] #align seminorm.of Seminorm.of /-- Alternative constructor for a `Seminorm` over a normed field `π•œ` that only assumes `f 0 = 0` and an inequality for the scalar multiplication. -/ def Seminorm.ofSMulLE [NormedField π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (map_zero : f 0 = 0) (add_le : βˆ€ x y, f (x + y) ≀ f x + f y) (smul_le : βˆ€ (r : π•œ) (x), f (r β€’ x) ≀ β€–rβ€– * f x) : Seminorm π•œ E := Seminorm.of f add_le fun r x => by refine' le_antisymm (smul_le r x) _ by_cases h : r = 0 Β· simp [h, map_zero] rw [← mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))] rw [inv_mul_cancel_leftβ‚€ (norm_ne_zero_iff.mpr h)] specialize smul_le r⁻¹ (r β€’ x) rw [norm_inv] at smul_le convert smul_le simp [h] #align seminorm.of_smul_le Seminorm.ofSMulLE end Of namespace Seminorm section SeminormedRing variable [SeminormedRing π•œ] section AddGroup variable [AddGroup E] section SMul variable [SMul π•œ E] instance instSeminormClass : SeminormClass (Seminorm π•œ E) π•œ E where coe f := f.toFun coe_injective' f g h := by rcases f with ⟨⟨_⟩⟩ rcases g with ⟨⟨_⟩⟩ congr map_zero f := f.map_zero' map_add_le_add f := f.add_le' map_neg_eq_map f := f.neg' map_smul_eq_mul f := f.smul' #align seminorm.seminorm_class Seminorm.instSeminormClass /-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/ instance instCoeFun : CoeFun (Seminorm π•œ E) fun _ => E β†’ ℝ := FunLike.hasCoeToFun @[ext] theorem ext {p q : Seminorm π•œ E} (h : βˆ€ x, (p : E β†’ ℝ) x = q x) : p = q := FunLike.ext p q h #align seminorm.ext Seminorm.ext instance instZero : Zero (Seminorm π•œ E) := ⟨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with smul' := fun _ _ => (mul_zero _).symm }⟩ @[simp] theorem coe_zero : ⇑(0 : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_zero Seminorm.coe_zero @[simp] theorem zero_apply (x : E) : (0 : Seminorm π•œ E) x = 0 := rfl #align seminorm.zero_apply Seminorm.zero_apply instance : Inhabited (Seminorm π•œ E) := ⟨0⟩ variable (p : Seminorm π•œ E) (c : π•œ) (x y : E) (r : ℝ) /-- Any action on `ℝ` which factors through `ℝβ‰₯0` applies to a seminorm. -/ instance instSMul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : SMul R (Seminorm π•œ E) where smul r p := { r β€’ p.toAddGroupSeminorm with toFun := fun x => r β€’ p x smul' := fun _ _ => by simp only [← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul] rw [map_smul_eq_mul, mul_left_comm] } instance [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] [SMul R' ℝ] [SMul R' ℝβ‰₯0] [IsScalarTower R' ℝβ‰₯0 ℝ] [SMul R R'] [IsScalarTower R R' ℝ] : IsScalarTower R R' (Seminorm π•œ E) where smul_assoc r a p := ext fun x => smul_assoc r a (p x) theorem coe_smul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) : ⇑(r β€’ p) = r β€’ ⇑p := rfl #align seminorm.coe_smul Seminorm.coe_smul @[simp] theorem smul_apply [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) (x : E) : (r β€’ p) x = r β€’ p x := rfl #align seminorm.smul_apply Seminorm.smul_apply instance instAdd : Add (Seminorm π•œ E) where add p q := { p.toAddGroupSeminorm + q.toAddGroupSeminorm with toFun := fun x => p x + q x smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] } theorem coe_add (p q : Seminorm π•œ E) : ⇑(p + q) = p + q := rfl #align seminorm.coe_add Seminorm.coe_add @[simp] theorem add_apply (p q : Seminorm π•œ E) (x : E) : (p + q) x = p x + q x := rfl #align seminorm.add_apply Seminorm.add_apply instance instAddMonoid : AddMonoid (Seminorm π•œ E) := FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π•œ E) := FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl instance instMulAction [Monoid R] [MulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : MulAction R (Seminorm π•œ E) := FunLike.coe_injective.mulAction _ (by intros; rfl) variable (π•œ E) /-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π•œ E` is a module. -/ @[simps] def coeFnAddMonoidHom : AddMonoidHom (Seminorm π•œ E) (E β†’ ℝ) where toFun := (↑) map_zero' := coe_zero map_add' := coe_add #align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π•œ E) := show @Function.Injective (Seminorm π•œ E) (E β†’ ℝ) (↑) from FunLike.coe_injective #align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective variable {π•œ E} instance instDistribMulAction [Monoid R] [DistribMulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : DistribMulAction R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).distribMulAction _ (by intros; rfl) instance instModule [Semiring R] [Module R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : Module R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).module R _ (by intros; rfl) instance instSup : Sup (Seminorm π•œ E) where sup p q := { p.toAddGroupSeminorm βŠ” q.toAddGroupSeminorm with toFun := p βŠ” q smul' := fun x v => (congr_argβ‚‚ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <| (mul_max_of_nonneg _ _ <| norm_nonneg x).symm } @[simp] theorem coe_sup (p q : Seminorm π•œ E) : ⇑(p βŠ” q) = (p : E β†’ ℝ) βŠ” (q : E β†’ ℝ) := rfl #align seminorm.coe_sup Seminorm.coe_sup theorem sup_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ” q) x = p x βŠ” q x := rfl #align seminorm.sup_apply Seminorm.sup_apply theorem smul_sup [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ” q) = r β€’ p βŠ” r β€’ q := have real.smul_max : βˆ€ x y : ℝ, r β€’ max x y = max (r β€’ x) (r β€’ y) := fun x y => by simpa only [← smul_eq_mul, ← NNReal.smul_def, smul_one_smul ℝβ‰₯0 r (_ : ℝ)] using mul_max_of_nonneg x y (r β€’ (1 : ℝβ‰₯0) : ℝβ‰₯0).coe_nonneg ext fun x => real.smul_max _ _ #align seminorm.smul_sup Seminorm.smul_sup instance instPartialOrder : PartialOrder (Seminorm π•œ E) := PartialOrder.lift _ FunLike.coe_injective @[simp, norm_cast] theorem coe_le_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) ≀ q ↔ p ≀ q := Iff.rfl #align seminorm.coe_le_coe Seminorm.coe_le_coe @[simp, norm_cast] theorem coe_lt_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) < q ↔ p < q := Iff.rfl #align seminorm.coe_lt_coe Seminorm.coe_lt_coe theorem le_def {p q : Seminorm π•œ E} : p ≀ q ↔ βˆ€ x, p x ≀ q x := Iff.rfl #align seminorm.le_def Seminorm.le_def theorem lt_def {p q : Seminorm π•œ E} : p < q ↔ p ≀ q ∧ βˆƒ x, p x < q x := @Pi.lt_def _ _ _ p q #align seminorm.lt_def Seminorm.lt_def instance instSemilatticeSup : SemilatticeSup (Seminorm π•œ E) := Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup end SMul end AddGroup section Module variable [SeminormedRing π•œβ‚‚] [SeminormedRing π•œβ‚ƒ] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable {σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₂₃] variable {σ₁₃ : π•œ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₁₃] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [AddCommGroup E₃] variable [AddCommGroup F] [AddCommGroup G] variable [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] [Module π•œβ‚ƒ E₃] [Module π•œ F] [Module π•œ G] -- Porting note: even though this instance is found immediately by typeclass search, -- it seems to be needed below!? noncomputable instance smul_nnreal_real : SMul ℝβ‰₯0 ℝ := inferInstance variable [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] /-- Composition of a seminorm with a linear map is a seminorm. -/ def comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œ E := { p.toAddGroupSeminorm.comp f.toAddMonoidHom with toFun := fun x => p (f x) -- Porting note: the `simp only` below used to be part of the `rw`. -- I'm not sure why this change was needed, and am worried by it! smul' := fun _ _ => by simp only [map_smulβ‚›β‚—]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] } #align seminorm.comp Seminorm.comp theorem coe_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : ⇑(p.comp f) = p ∘ f := rfl #align seminorm.coe_comp Seminorm.coe_comp @[simp] theorem comp_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (x : E) : (p.comp f) x = p (f x) := rfl #align seminorm.comp_apply Seminorm.comp_apply @[simp] theorem comp_id (p : Seminorm π•œ E) : p.comp LinearMap.id = p := ext fun _ => rfl #align seminorm.comp_id Seminorm.comp_id @[simp] theorem comp_zero (p : Seminorm π•œβ‚‚ Eβ‚‚) : p.comp (0 : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) = 0 := ext fun _ => map_zero p #align seminorm.comp_zero Seminorm.comp_zero @[simp] theorem zero_comp (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (0 : Seminorm π•œβ‚‚ Eβ‚‚).comp f = 0 := ext fun _ => rfl #align seminorm.zero_comp Seminorm.zero_comp theorem comp_comp [RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] (p : Seminorm π•œβ‚ƒ E₃) (g : Eβ‚‚ β†’β‚›β‚—[σ₂₃] E₃) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (g.comp f) = (p.comp g).comp f := ext fun _ => rfl #align seminorm.comp_comp Seminorm.comp_comp theorem add_comp (p q : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (p + q).comp f = p.comp f + q.comp f := ext fun _ => rfl #align seminorm.add_comp Seminorm.add_comp theorem comp_add_le (p : Seminorm π•œβ‚‚ Eβ‚‚) (f g : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (f + g) ≀ p.comp f + p.comp g := fun _ => map_add_le_add p _ _ #align seminorm.comp_add_le Seminorm.comp_add_le theorem smul_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : R) : (c β€’ p).comp f = c β€’ p.comp f := ext fun _ => rfl #align seminorm.smul_comp Seminorm.smul_comp theorem comp_mono {p q : Seminorm π•œβ‚‚ Eβ‚‚} (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (hp : p ≀ q) : p.comp f ≀ q.comp f := fun _ => hp _ #align seminorm.comp_mono Seminorm.comp_mono /-- The composition as an `AddMonoidHom`. -/ @[simps] def pullback (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œβ‚‚ Eβ‚‚ β†’+ Seminorm π•œ E where toFun := fun p => p.comp f map_zero' := zero_comp f map_add' := fun p q => add_comp p q f #align seminorm.pullback Seminorm.pullback instance instOrderBot : OrderBot (Seminorm π•œ E) where bot := 0 bot_le := map_nonneg @[simp] theorem coe_bot : ⇑(βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_bot Seminorm.coe_bot theorem bot_eq_zero : (βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.bot_eq_zero Seminorm.bot_eq_zero theorem smul_le_smul {p q : Seminorm π•œ E} {a b : ℝβ‰₯0} (hpq : p ≀ q) (hab : a ≀ b) : a β€’ p ≀ b β€’ q := by simp_rw [le_def] intro x exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b) #align seminorm.smul_le_smul Seminorm.smul_le_smul theorem finset_sup_apply (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = ↑(s.sup fun i => ⟨p i x, map_nonneg (p i) x⟩ : ℝβ‰₯0) := by induction' s using Finset.cons_induction_on with a s ha ih Β· rw [Finset.sup_empty, Finset.sup_empty, coe_bot, _root_.bot_eq_zero, Pi.zero_apply] norm_cast Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max, NNReal.coe_max, NNReal.coe_mk, ih] #align seminorm.finset_sup_apply Seminorm.finset_sup_apply theorem exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) : βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.exists_mem_eq_sup s hs (fun i ↦ (⟨p i x, map_nonneg _ _⟩ : ℝβ‰₯0)) with ⟨i, hi, hix⟩ rw [finset_sup_apply] exact ⟨i, hi, congr_arg _ hix⟩ theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = 0 ∨ βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.eq_empty_or_nonempty s with (rfl|hs) Β· left; rfl Β· right; exact exists_apply_eq_finset_sup p hs x theorem finset_sup_smul (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (C : ℝβ‰₯0) : s.sup (C β€’ p) = C β€’ s.sup p := by ext x rw [smul_apply, finset_sup_apply, finset_sup_apply] symm exact congr_arg ((↑) : ℝβ‰₯0 β†’ ℝ) (NNReal.mul_finset_sup C s (fun i ↦ ⟨p i x, map_nonneg _ _⟩)) theorem finset_sup_le_sum (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) : s.sup p ≀ βˆ‘ i in s, p i := by classical refine' Finset.sup_le_iff.mpr _ intro i hi rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left] exact bot_le #align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum theorem finset_sup_apply_le {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 ≀ a) (h : βˆ€ i, i ∈ s β†’ p i x ≀ a) : s.sup p x ≀ a := by lift a to ℝβ‰₯0 using ha rw [finset_sup_apply, NNReal.coe_le_coe] exact Finset.sup_le h #align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le theorem le_finset_sup_apply {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {i : ΞΉ} (hi : i ∈ s) : p i x ≀ s.sup p x := (Finset.le_sup hi : p i ≀ s.sup p) x theorem finset_sup_apply_lt {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 < a) (h : βˆ€ i, i ∈ s β†’ p i x < a) : s.sup p x < a := by lift a to ℝβ‰₯0 using ha.le rw [finset_sup_apply, NNReal.coe_lt_coe, Finset.sup_lt_iff] Β· exact h Β· exact NNReal.coe_pos.mpr ha #align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt theorem norm_sub_map_le_sub (p : Seminorm π•œ E) (x y : E) : β€–p x - p yβ€– ≀ p (x - y) := abs_sub_map_le_sub p x y #align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub end Module end SeminormedRing section SeminormedCommRing variable [SeminormedRing π•œ] [SeminormedCommRing π•œβ‚‚] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] theorem comp_smul (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) : p.comp (c β€’ f) = β€–cβ€–β‚Š β€’ p.comp f := ext fun _ => by rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm, smul_eq_mul, comp_apply] #align seminorm.comp_smul Seminorm.comp_smul theorem comp_smul_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) (x : E) : p.comp (c β€’ f) x = β€–cβ€– * p (f x) := map_smul_eq_mul p _ _ #align seminorm.comp_smul_apply Seminorm.comp_smul_apply end SeminormedCommRing section NormedField variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] {p q : Seminorm π•œ E} {x : E} /-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/ theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) := ⟨0, by rintro _ ⟨x, rfl⟩ dsimp; positivity⟩ #align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add noncomputable instance instInf : Inf (Seminorm π•œ E) where inf p q := { p.toAddGroupSeminorm βŠ“ q.toAddGroupSeminorm with toFun := fun x => β¨… u : E, p u + q (x - u) smul' := by intro a x obtain rfl | ha := eq_or_ne a 0 Β· rw [norm_zero, zero_mul, zero_smul] refine' ciInf_eq_of_forall_ge_of_forall_gt_exists_lt -- Porting note: the following was previously `fun i => by positivity` (fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _)) fun x hx => ⟨0, by rwa [map_zero, sub_zero, map_zero, add_zero]⟩ simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, ← map_smul_eq_mul p, ← map_smul_eq_mul q, smul_sub] refine' Function.Surjective.iInf_congr ((a⁻¹ β€’ Β·) : E β†’ E) (fun u => ⟨a β€’ u, inv_smul_smulβ‚€ ha u⟩) fun u => _ rw [smul_inv_smulβ‚€ ha] } @[simp] theorem inf_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ“ q) x = β¨… u : E, p u + q (x - u) := rfl #align seminorm.inf_apply Seminorm.inf_apply noncomputable instance instLattice : Lattice (Seminorm π•œ E) := { Seminorm.instSemilatticeSup with inf := (Β· βŠ“ Β·) inf_le_left := fun p q x => ciInf_le_of_le bddBelow_range_add x <| by simp only [sub_self, map_zero, add_zero]; rfl inf_le_right := fun p q x => ciInf_le_of_le bddBelow_range_add 0 <| by simp only [sub_self, map_zero, zero_add, sub_zero]; rfl le_inf := fun a b c hab hac x => le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) } theorem smul_inf [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ“ q) = r β€’ p βŠ“ r β€’ q := by ext simp_rw [smul_apply, inf_apply, smul_apply, ← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add] #align seminorm.smul_inf Seminorm.smul_inf section Classical open Classical /-- We define the supremum of an arbitrary subset of `Seminorm π•œ E` as follows: * if `s` is `BddAbove` *as a set of functions `E β†’ ℝ`* (that is, if `s` is pointwise bounded above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a seminorm. * otherwise, we take the zero seminorm `βŠ₯`. There are two things worth mentioning here: * First, it is not trivial at first that `s` being bounded above *by a function* implies being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make the case disjunction on `BddAbove ((↑) '' s : Set (E β†’ ℝ))` and not `BddAbove s`. * Since the pointwise `Sup` already gives `0` at points where a family of functions is not bounded above, one could hope that just using the pointwise `Sup` would work here, without the need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can give a function which does *not* satisfy the seminorm axioms (typically sub-additivity). -/ noncomputable instance instSupSet : SupSet (Seminorm π•œ E) where sSup s := if h : BddAbove ((↑) '' s : Set (E β†’ ℝ)) then { toFun := ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) map_zero' := by rw [iSup_apply, ← @Real.ciSup_const_zero s] congr! rename_i _ _ _ i exact map_zero i.1 add_le' := fun x y => by rcases h with ⟨q, hq⟩ obtain rfl | h := s.eq_empty_or_nonempty Β· simp [Real.ciSup_empty] haveI : Nonempty ↑s := h.coe_sort simp only [iSup_apply] refine' ciSup_le fun i => ((i : Seminorm π•œ E).add_le' x y).trans <| add_le_add -- Porting note: `f` is provided to force `Subtype.val` to appear. -- A type ascription on `_` would have also worked, but would have been more verbose. (le_ciSup (f := fun i => (Subtype.val i : Seminorm π•œ E).toFun x) ⟨q x, _⟩ i) (le_ciSup (f := fun i => (Subtype.val i : Seminorm π•œ E).toFun y) ⟨q y, _⟩ i) <;> rw [mem_upperBounds, forall_range_iff] <;> exact fun j => hq (mem_image_of_mem _ j.2) _ neg' := fun x => by simp only [iSup_apply] congr! 2 rename_i _ _ _ i exact i.1.neg' _ smul' := fun a x => by simp only [iSup_apply] rw [← smul_eq_mul, Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π•œ E) x] congr! rename_i _ _ _ i exact i.1.smul' a x } else βŠ₯ protected theorem coe_sSup_eq' {s : Set <| Seminorm π•œ E} (hs : BddAbove ((↑) '' s : Set (E β†’ ℝ))) : ↑(sSup s) = ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) := congr_arg _ (dif_pos hs) #align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq' protected theorem bddAbove_iff {s : Set <| Seminorm π•œ E} : BddAbove s ↔ BddAbove ((↑) '' s : Set (E β†’ ℝ)) := ⟨fun ⟨q, hq⟩ => ⟨q, ball_image_of_ball fun p hp => hq hp⟩, fun H => ⟨sSup s, fun p hp x => by dsimp rw [Seminorm.coe_sSup_eq' H, iSup_apply] rcases H with ⟨q, hq⟩ exact le_ciSup ⟨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) x⟩ ⟨p, hp⟩⟩⟩ #align seminorm.bdd_above_iff Seminorm.bddAbove_iff protected theorem bddAbove_range_iff {p : ΞΉ β†’ Seminorm π•œ E} : BddAbove (range p) ↔ βˆ€ x, BddAbove (range fun i ↦ p i x) := by rw [Seminorm.bddAbove_iff, ← range_comp, bddAbove_range_pi]; rfl protected theorem coe_sSup_eq {s : Set <| Seminorm π•œ E} (hs : BddAbove s) : ↑(sSup s) = ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) := Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs) #align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β†’ Seminorm π•œ E} (hp : BddAbove (range p)) : ↑(⨆ i, p i) = ⨆ i, ((p i : Seminorm π•œ E) : E β†’ ℝ) := by rw [← sSup_range, Seminorm.coe_sSup_eq hp] exact iSup_range' (fun p : Seminorm π•œ E => (p : E β†’ ℝ)) p #align seminorm.coe_supr_eq Seminorm.coe_iSup_eq protected theorem sSup_apply {s : Set (Seminorm π•œ E)} (hp : BddAbove s) {x : E} : (sSup s) x = ⨆ p : s, (p : E β†’ ℝ) x := by rw [Seminorm.coe_sSup_eq hp, iSup_apply] protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β†’ Seminorm π•œ E} (hp : BddAbove (range p)) {x : E} : (⨆ i, p i) x = ⨆ i, p i x := by rw [Seminorm.coe_iSup_eq hp, iSup_apply] protected theorem sSup_empty : sSup (βˆ… : Set (Seminorm π•œ E)) = βŠ₯ := by ext
rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
protected theorem sSup_empty : sSup (βˆ… : Set (Seminorm π•œ E)) = βŠ₯ := by ext
Mathlib.Analysis.Seminorm.629_0.ywwMCgoKeIFKDZ3
protected theorem sSup_empty : sSup (βˆ… : Set (Seminorm π•œ E)) = βŠ₯
Mathlib_Analysis_Seminorm
case h R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p q : Seminorm π•œ E x x✝ : E ⊒ 0 = βŠ₯ 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
protected theorem sSup_empty : sSup (βˆ… : Set (Seminorm π•œ E)) = βŠ₯ := by ext rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty]
Mathlib.Analysis.Seminorm.629_0.ywwMCgoKeIFKDZ3
protected theorem sSup_empty : sSup (βˆ… : Set (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✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p q : Seminorm π•œ E x : E s : Set (Seminorm π•œ E) hs₁ : BddAbove s hsβ‚‚ : Set.Nonempty s ⊒ IsLUB s (sSup 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 => _⟩
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π•œ E)) (hs₁ : BddAbove s) (hsβ‚‚ : s.Nonempty) : IsLUB s (sSup s) := by
Mathlib.Analysis.Seminorm.634_0.ywwMCgoKeIFKDZ3
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π•œ E)) (hs₁ : BddAbove s) (hsβ‚‚ : s.Nonempty) : IsLUB s (sSup s)
Mathlib_Analysis_Seminorm
case refine'_1 R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p✝ q : Seminorm π•œ E x✝ : E s : Set (Seminorm π•œ E) hs₁ : BddAbove s hsβ‚‚ : Set.Nonempty s p : Seminorm π•œ E hp : p ∈ s x : E ⊒ (fun f => ⇑f) p x ≀ (fun f => ⇑f) (sSup s) 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
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 => _⟩ <;>
Mathlib.Analysis.Seminorm.634_0.ywwMCgoKeIFKDZ3
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π•œ E)) (hs₁ : BddAbove s) (hsβ‚‚ : s.Nonempty) : IsLUB s (sSup s)
Mathlib_Analysis_Seminorm
case refine'_2 R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p✝ q : Seminorm π•œ E x✝ : E s : Set (Seminorm π•œ E) hs₁ : BddAbove s hsβ‚‚ : Set.Nonempty s p : Seminorm π•œ E hp : p ∈ upperBounds s x : E ⊒ (fun f => ⇑f) (sSup s) x ≀ (fun f => ⇑f) 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
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 => _⟩ <;>
Mathlib.Analysis.Seminorm.634_0.ywwMCgoKeIFKDZ3
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π•œ E)) (hs₁ : BddAbove s) (hsβ‚‚ : s.Nonempty) : IsLUB s (sSup s)
Mathlib_Analysis_Seminorm
case refine'_1 R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p✝ q : Seminorm π•œ E x✝ : E s : Set (Seminorm π•œ E) hs₁ : BddAbove s hsβ‚‚ : Set.Nonempty s p : Seminorm π•œ E hp : p ∈ s x : E this : Nonempty ↑s ⊒ (fun f => ⇑f) p x ≀ (fun f => ⇑f) (sSup s) 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
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 <;>
Mathlib.Analysis.Seminorm.634_0.ywwMCgoKeIFKDZ3
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π•œ E)) (hs₁ : BddAbove s) (hsβ‚‚ : s.Nonempty) : IsLUB s (sSup s)
Mathlib_Analysis_Seminorm
case refine'_2 R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p✝ q : Seminorm π•œ E x✝ : E s : Set (Seminorm π•œ E) hs₁ : BddAbove s hsβ‚‚ : Set.Nonempty s p : Seminorm π•œ E hp : p ∈ upperBounds s x : E this : Nonempty ↑s ⊒ (fun f => ⇑f) (sSup s) x ≀ (fun f => ⇑f) 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
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 <;>
Mathlib.Analysis.Seminorm.634_0.ywwMCgoKeIFKDZ3
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π•œ E)) (hs₁ : BddAbove s) (hsβ‚‚ : s.Nonempty) : IsLUB s (sSup s)
Mathlib_Analysis_Seminorm
case refine'_1 R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p✝ q : Seminorm π•œ E x✝ : E s : Set (Seminorm π•œ E) hs₁ : BddAbove s hsβ‚‚ : Set.Nonempty s p : Seminorm π•œ E hp : p ∈ s x : E this : Nonempty ↑s ⊒ p x ≀ (sSup s) 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]
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 <;>
Mathlib.Analysis.Seminorm.634_0.ywwMCgoKeIFKDZ3
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π•œ E)) (hs₁ : BddAbove s) (hsβ‚‚ : s.Nonempty) : IsLUB s (sSup s)
Mathlib_Analysis_Seminorm
case refine'_2 R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p✝ q : Seminorm π•œ E x✝ : E s : Set (Seminorm π•œ E) hs₁ : BddAbove s hsβ‚‚ : Set.Nonempty s p : Seminorm π•œ E hp : p ∈ upperBounds s x : E this : Nonempty ↑s ⊒ (sSup s) x ≀ 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]
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 <;>
Mathlib.Analysis.Seminorm.634_0.ywwMCgoKeIFKDZ3
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π•œ E)) (hs₁ : BddAbove s) (hsβ‚‚ : s.Nonempty) : IsLUB s (sSup s)
Mathlib_Analysis_Seminorm
case refine'_1 R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p✝ q : Seminorm π•œ E x✝ : E s : Set (Seminorm π•œ E) hs₁ : BddAbove s hsβ‚‚ : Set.Nonempty s p : Seminorm π•œ E hp : p ∈ s x : E this : Nonempty ↑s ⊒ p x ≀ ⨆ i, ↑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⟩
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] Β·
Mathlib.Analysis.Seminorm.634_0.ywwMCgoKeIFKDZ3
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π•œ E)) (hs₁ : BddAbove s) (hsβ‚‚ : s.Nonempty) : IsLUB s (sSup s)
Mathlib_Analysis_Seminorm
case refine'_1.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 x✝ : E s : Set (Seminorm π•œ E) hsβ‚‚ : Set.Nonempty s p : Seminorm π•œ E hp : p ∈ s x : E this : Nonempty ↑s q : Seminorm π•œ E hq : q ∈ upperBounds s ⊒ p x ≀ ⨆ i, ↑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⟩
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⟩
Mathlib.Analysis.Seminorm.634_0.ywwMCgoKeIFKDZ3
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π•œ E)) (hs₁ : BddAbove s) (hsβ‚‚ : s.Nonempty) : IsLUB s (sSup s)
Mathlib_Analysis_Seminorm
case refine'_2 R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : NormedField π•œ inst✝¹ : AddCommGroup E inst✝ : Module π•œ E p✝ q : Seminorm π•œ E x✝ : E s : Set (Seminorm π•œ E) hs₁ : BddAbove s hsβ‚‚ : Set.Nonempty s p : Seminorm π•œ E hp : p ∈ upperBounds s x : E this : Nonempty ↑s ⊒ ⨆ i, ↑i x ≀ 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
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⟩ Β·
Mathlib.Analysis.Seminorm.634_0.ywwMCgoKeIFKDZ3
private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π•œ E)) (hs₁ : BddAbove s) (hsβ‚‚ : s.Nonempty) : IsLUB s (sSup s)
Mathlib_Analysis_Seminorm
R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : SeminormedRing π•œ inst✝¹ : AddCommGroup E inst✝ : SMul π•œ E p : Seminorm π•œ E x y : E r : ℝ hr : 0 < r ⊒ x ∈ ball p x r
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, YaΓ«l Dillies, Moritz Doll -/ import Mathlib.Data.Real.Pointwise import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.LocallyConvex.Basic import Mathlib.Analysis.Normed.Group.AddTorsor #align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c" /-! # Seminorms This file defines seminorms. A seminorm is a function to the reals which is positive-semidefinite, absolutely homogeneous, and subadditive. They are closely related to convex sets, and a topological vector space is locally convex if and only if its topology is induced by a family of seminorms. ## Main declarations For a module over a normed ring: * `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and subadditive. * `normSeminorm π•œ E`: The norm on `E` as a seminorm. ## References * [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966] ## Tags seminorm, locally convex, LCTVS -/ set_option autoImplicit true open NormedField Set Filter open scoped BigOperators NNReal Pointwise Topology Uniformity variable {R R' π•œ π•œβ‚‚ π•œβ‚ƒ 𝕝 E Eβ‚‚ E₃ F G ΞΉ : Type*} /-- A seminorm on a module over a normed ring is a function to the reals that is positive semidefinite, positive homogeneous, and subadditive. -/ structure Seminorm (π•œ : Type*) (E : Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminorm E where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ smul' : βˆ€ (a : π•œ) (x : E), toFun (a β€’ x) = β€–aβ€– * toFun x #align seminorm Seminorm attribute [nolint docBlame] Seminorm.toAddGroupSeminorm /-- `SeminormClass F π•œ E` states that `F` is a type of seminorms on the `π•œ`-module `E`. You should extend this class when you extend `Seminorm`. -/ class SeminormClass (F : Type*) (π•œ E : outParam <| Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminormClass F E ℝ where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ map_smul_eq_mul (f : F) (a : π•œ) (x : E) : f (a β€’ x) = β€–aβ€– * f x #align seminorm_class SeminormClass export SeminormClass (map_smul_eq_mul) -- Porting note: dangerous instances no longer exist -- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass section Of /-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a `SeminormedRing π•œ`. -/ def Seminorm.of [SeminormedRing π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (add_le : βˆ€ x y : E, f (x + y) ≀ f x + f y) (smul : βˆ€ (a : π•œ) (x : E), f (a β€’ x) = β€–aβ€– * f x) : Seminorm π•œ E where toFun := f map_zero' := by rw [← zero_smul π•œ (0 : E), smul, norm_zero, zero_mul] add_le' := add_le smul' := smul neg' x := by rw [← neg_one_smul π•œ, smul, norm_neg, ← smul, one_smul] #align seminorm.of Seminorm.of /-- Alternative constructor for a `Seminorm` over a normed field `π•œ` that only assumes `f 0 = 0` and an inequality for the scalar multiplication. -/ def Seminorm.ofSMulLE [NormedField π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (map_zero : f 0 = 0) (add_le : βˆ€ x y, f (x + y) ≀ f x + f y) (smul_le : βˆ€ (r : π•œ) (x), f (r β€’ x) ≀ β€–rβ€– * f x) : Seminorm π•œ E := Seminorm.of f add_le fun r x => by refine' le_antisymm (smul_le r x) _ by_cases h : r = 0 Β· simp [h, map_zero] rw [← mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))] rw [inv_mul_cancel_leftβ‚€ (norm_ne_zero_iff.mpr h)] specialize smul_le r⁻¹ (r β€’ x) rw [norm_inv] at smul_le convert smul_le simp [h] #align seminorm.of_smul_le Seminorm.ofSMulLE end Of namespace Seminorm section SeminormedRing variable [SeminormedRing π•œ] section AddGroup variable [AddGroup E] section SMul variable [SMul π•œ E] instance instSeminormClass : SeminormClass (Seminorm π•œ E) π•œ E where coe f := f.toFun coe_injective' f g h := by rcases f with ⟨⟨_⟩⟩ rcases g with ⟨⟨_⟩⟩ congr map_zero f := f.map_zero' map_add_le_add f := f.add_le' map_neg_eq_map f := f.neg' map_smul_eq_mul f := f.smul' #align seminorm.seminorm_class Seminorm.instSeminormClass /-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/ instance instCoeFun : CoeFun (Seminorm π•œ E) fun _ => E β†’ ℝ := FunLike.hasCoeToFun @[ext] theorem ext {p q : Seminorm π•œ E} (h : βˆ€ x, (p : E β†’ ℝ) x = q x) : p = q := FunLike.ext p q h #align seminorm.ext Seminorm.ext instance instZero : Zero (Seminorm π•œ E) := ⟨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with smul' := fun _ _ => (mul_zero _).symm }⟩ @[simp] theorem coe_zero : ⇑(0 : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_zero Seminorm.coe_zero @[simp] theorem zero_apply (x : E) : (0 : Seminorm π•œ E) x = 0 := rfl #align seminorm.zero_apply Seminorm.zero_apply instance : Inhabited (Seminorm π•œ E) := ⟨0⟩ variable (p : Seminorm π•œ E) (c : π•œ) (x y : E) (r : ℝ) /-- Any action on `ℝ` which factors through `ℝβ‰₯0` applies to a seminorm. -/ instance instSMul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : SMul R (Seminorm π•œ E) where smul r p := { r β€’ p.toAddGroupSeminorm with toFun := fun x => r β€’ p x smul' := fun _ _ => by simp only [← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul] rw [map_smul_eq_mul, mul_left_comm] } instance [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] [SMul R' ℝ] [SMul R' ℝβ‰₯0] [IsScalarTower R' ℝβ‰₯0 ℝ] [SMul R R'] [IsScalarTower R R' ℝ] : IsScalarTower R R' (Seminorm π•œ E) where smul_assoc r a p := ext fun x => smul_assoc r a (p x) theorem coe_smul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) : ⇑(r β€’ p) = r β€’ ⇑p := rfl #align seminorm.coe_smul Seminorm.coe_smul @[simp] theorem smul_apply [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) (x : E) : (r β€’ p) x = r β€’ p x := rfl #align seminorm.smul_apply Seminorm.smul_apply instance instAdd : Add (Seminorm π•œ E) where add p q := { p.toAddGroupSeminorm + q.toAddGroupSeminorm with toFun := fun x => p x + q x smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] } theorem coe_add (p q : Seminorm π•œ E) : ⇑(p + q) = p + q := rfl #align seminorm.coe_add Seminorm.coe_add @[simp] theorem add_apply (p q : Seminorm π•œ E) (x : E) : (p + q) x = p x + q x := rfl #align seminorm.add_apply Seminorm.add_apply instance instAddMonoid : AddMonoid (Seminorm π•œ E) := FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π•œ E) := FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl instance instMulAction [Monoid R] [MulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : MulAction R (Seminorm π•œ E) := FunLike.coe_injective.mulAction _ (by intros; rfl) variable (π•œ E) /-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π•œ E` is a module. -/ @[simps] def coeFnAddMonoidHom : AddMonoidHom (Seminorm π•œ E) (E β†’ ℝ) where toFun := (↑) map_zero' := coe_zero map_add' := coe_add #align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π•œ E) := show @Function.Injective (Seminorm π•œ E) (E β†’ ℝ) (↑) from FunLike.coe_injective #align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective variable {π•œ E} instance instDistribMulAction [Monoid R] [DistribMulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : DistribMulAction R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).distribMulAction _ (by intros; rfl) instance instModule [Semiring R] [Module R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : Module R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).module R _ (by intros; rfl) instance instSup : Sup (Seminorm π•œ E) where sup p q := { p.toAddGroupSeminorm βŠ” q.toAddGroupSeminorm with toFun := p βŠ” q smul' := fun x v => (congr_argβ‚‚ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <| (mul_max_of_nonneg _ _ <| norm_nonneg x).symm } @[simp] theorem coe_sup (p q : Seminorm π•œ E) : ⇑(p βŠ” q) = (p : E β†’ ℝ) βŠ” (q : E β†’ ℝ) := rfl #align seminorm.coe_sup Seminorm.coe_sup theorem sup_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ” q) x = p x βŠ” q x := rfl #align seminorm.sup_apply Seminorm.sup_apply theorem smul_sup [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ” q) = r β€’ p βŠ” r β€’ q := have real.smul_max : βˆ€ x y : ℝ, r β€’ max x y = max (r β€’ x) (r β€’ y) := fun x y => by simpa only [← smul_eq_mul, ← NNReal.smul_def, smul_one_smul ℝβ‰₯0 r (_ : ℝ)] using mul_max_of_nonneg x y (r β€’ (1 : ℝβ‰₯0) : ℝβ‰₯0).coe_nonneg ext fun x => real.smul_max _ _ #align seminorm.smul_sup Seminorm.smul_sup instance instPartialOrder : PartialOrder (Seminorm π•œ E) := PartialOrder.lift _ FunLike.coe_injective @[simp, norm_cast] theorem coe_le_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) ≀ q ↔ p ≀ q := Iff.rfl #align seminorm.coe_le_coe Seminorm.coe_le_coe @[simp, norm_cast] theorem coe_lt_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) < q ↔ p < q := Iff.rfl #align seminorm.coe_lt_coe Seminorm.coe_lt_coe theorem le_def {p q : Seminorm π•œ E} : p ≀ q ↔ βˆ€ x, p x ≀ q x := Iff.rfl #align seminorm.le_def Seminorm.le_def theorem lt_def {p q : Seminorm π•œ E} : p < q ↔ p ≀ q ∧ βˆƒ x, p x < q x := @Pi.lt_def _ _ _ p q #align seminorm.lt_def Seminorm.lt_def instance instSemilatticeSup : SemilatticeSup (Seminorm π•œ E) := Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup end SMul end AddGroup section Module variable [SeminormedRing π•œβ‚‚] [SeminormedRing π•œβ‚ƒ] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable {σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₂₃] variable {σ₁₃ : π•œ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₁₃] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [AddCommGroup E₃] variable [AddCommGroup F] [AddCommGroup G] variable [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] [Module π•œβ‚ƒ E₃] [Module π•œ F] [Module π•œ G] -- Porting note: even though this instance is found immediately by typeclass search, -- it seems to be needed below!? noncomputable instance smul_nnreal_real : SMul ℝβ‰₯0 ℝ := inferInstance variable [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] /-- Composition of a seminorm with a linear map is a seminorm. -/ def comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œ E := { p.toAddGroupSeminorm.comp f.toAddMonoidHom with toFun := fun x => p (f x) -- Porting note: the `simp only` below used to be part of the `rw`. -- I'm not sure why this change was needed, and am worried by it! smul' := fun _ _ => by simp only [map_smulβ‚›β‚—]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] } #align seminorm.comp Seminorm.comp theorem coe_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : ⇑(p.comp f) = p ∘ f := rfl #align seminorm.coe_comp Seminorm.coe_comp @[simp] theorem comp_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (x : E) : (p.comp f) x = p (f x) := rfl #align seminorm.comp_apply Seminorm.comp_apply @[simp] theorem comp_id (p : Seminorm π•œ E) : p.comp LinearMap.id = p := ext fun _ => rfl #align seminorm.comp_id Seminorm.comp_id @[simp] theorem comp_zero (p : Seminorm π•œβ‚‚ Eβ‚‚) : p.comp (0 : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) = 0 := ext fun _ => map_zero p #align seminorm.comp_zero Seminorm.comp_zero @[simp] theorem zero_comp (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (0 : Seminorm π•œβ‚‚ Eβ‚‚).comp f = 0 := ext fun _ => rfl #align seminorm.zero_comp Seminorm.zero_comp theorem comp_comp [RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] (p : Seminorm π•œβ‚ƒ E₃) (g : Eβ‚‚ β†’β‚›β‚—[σ₂₃] E₃) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (g.comp f) = (p.comp g).comp f := ext fun _ => rfl #align seminorm.comp_comp Seminorm.comp_comp theorem add_comp (p q : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (p + q).comp f = p.comp f + q.comp f := ext fun _ => rfl #align seminorm.add_comp Seminorm.add_comp theorem comp_add_le (p : Seminorm π•œβ‚‚ Eβ‚‚) (f g : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (f + g) ≀ p.comp f + p.comp g := fun _ => map_add_le_add p _ _ #align seminorm.comp_add_le Seminorm.comp_add_le theorem smul_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : R) : (c β€’ p).comp f = c β€’ p.comp f := ext fun _ => rfl #align seminorm.smul_comp Seminorm.smul_comp theorem comp_mono {p q : Seminorm π•œβ‚‚ Eβ‚‚} (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (hp : p ≀ q) : p.comp f ≀ q.comp f := fun _ => hp _ #align seminorm.comp_mono Seminorm.comp_mono /-- The composition as an `AddMonoidHom`. -/ @[simps] def pullback (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œβ‚‚ Eβ‚‚ β†’+ Seminorm π•œ E where toFun := fun p => p.comp f map_zero' := zero_comp f map_add' := fun p q => add_comp p q f #align seminorm.pullback Seminorm.pullback instance instOrderBot : OrderBot (Seminorm π•œ E) where bot := 0 bot_le := map_nonneg @[simp] theorem coe_bot : ⇑(βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_bot Seminorm.coe_bot theorem bot_eq_zero : (βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.bot_eq_zero Seminorm.bot_eq_zero theorem smul_le_smul {p q : Seminorm π•œ E} {a b : ℝβ‰₯0} (hpq : p ≀ q) (hab : a ≀ b) : a β€’ p ≀ b β€’ q := by simp_rw [le_def] intro x exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b) #align seminorm.smul_le_smul Seminorm.smul_le_smul theorem finset_sup_apply (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = ↑(s.sup fun i => ⟨p i x, map_nonneg (p i) x⟩ : ℝβ‰₯0) := by induction' s using Finset.cons_induction_on with a s ha ih Β· rw [Finset.sup_empty, Finset.sup_empty, coe_bot, _root_.bot_eq_zero, Pi.zero_apply] norm_cast Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max, NNReal.coe_max, NNReal.coe_mk, ih] #align seminorm.finset_sup_apply Seminorm.finset_sup_apply theorem exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) : βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.exists_mem_eq_sup s hs (fun i ↦ (⟨p i x, map_nonneg _ _⟩ : ℝβ‰₯0)) with ⟨i, hi, hix⟩ rw [finset_sup_apply] exact ⟨i, hi, congr_arg _ hix⟩ theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = 0 ∨ βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.eq_empty_or_nonempty s with (rfl|hs) Β· left; rfl Β· right; exact exists_apply_eq_finset_sup p hs x theorem finset_sup_smul (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (C : ℝβ‰₯0) : s.sup (C β€’ p) = C β€’ s.sup p := by ext x rw [smul_apply, finset_sup_apply, finset_sup_apply] symm exact congr_arg ((↑) : ℝβ‰₯0 β†’ ℝ) (NNReal.mul_finset_sup C s (fun i ↦ ⟨p i x, map_nonneg _ _⟩)) theorem finset_sup_le_sum (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) : s.sup p ≀ βˆ‘ i in s, p i := by classical refine' Finset.sup_le_iff.mpr _ intro i hi rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left] exact bot_le #align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum theorem finset_sup_apply_le {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 ≀ a) (h : βˆ€ i, i ∈ s β†’ p i x ≀ a) : s.sup p x ≀ a := by lift a to ℝβ‰₯0 using ha rw [finset_sup_apply, NNReal.coe_le_coe] exact Finset.sup_le h #align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le theorem le_finset_sup_apply {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {i : ΞΉ} (hi : i ∈ s) : p i x ≀ s.sup p x := (Finset.le_sup hi : p i ≀ s.sup p) x theorem finset_sup_apply_lt {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 < a) (h : βˆ€ i, i ∈ s β†’ p i x < a) : s.sup p x < a := by lift a to ℝβ‰₯0 using ha.le rw [finset_sup_apply, NNReal.coe_lt_coe, Finset.sup_lt_iff] Β· exact h Β· exact NNReal.coe_pos.mpr ha #align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt theorem norm_sub_map_le_sub (p : Seminorm π•œ E) (x y : E) : β€–p x - p yβ€– ≀ p (x - y) := abs_sub_map_le_sub p x y #align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub end Module end SeminormedRing section SeminormedCommRing variable [SeminormedRing π•œ] [SeminormedCommRing π•œβ‚‚] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] theorem comp_smul (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) : p.comp (c β€’ f) = β€–cβ€–β‚Š β€’ p.comp f := ext fun _ => by rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm, smul_eq_mul, comp_apply] #align seminorm.comp_smul Seminorm.comp_smul theorem comp_smul_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) (x : E) : p.comp (c β€’ f) x = β€–cβ€– * p (f x) := map_smul_eq_mul p _ _ #align seminorm.comp_smul_apply Seminorm.comp_smul_apply end SeminormedCommRing section NormedField variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] {p q : Seminorm π•œ E} {x : E} /-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/ theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) := ⟨0, by rintro _ ⟨x, rfl⟩ dsimp; positivity⟩ #align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add noncomputable instance instInf : Inf (Seminorm π•œ E) where inf p q := { p.toAddGroupSeminorm βŠ“ q.toAddGroupSeminorm with toFun := fun x => β¨… u : E, p u + q (x - u) smul' := by intro a x obtain rfl | ha := eq_or_ne a 0 Β· rw [norm_zero, zero_mul, zero_smul] refine' ciInf_eq_of_forall_ge_of_forall_gt_exists_lt -- Porting note: the following was previously `fun i => by positivity` (fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _)) fun x hx => ⟨0, by rwa [map_zero, sub_zero, map_zero, add_zero]⟩ simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, ← map_smul_eq_mul p, ← map_smul_eq_mul q, smul_sub] refine' Function.Surjective.iInf_congr ((a⁻¹ β€’ Β·) : E β†’ E) (fun u => ⟨a β€’ u, inv_smul_smulβ‚€ ha u⟩) fun u => _ rw [smul_inv_smulβ‚€ ha] } @[simp] theorem inf_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ“ q) x = β¨… u : E, p u + q (x - u) := rfl #align seminorm.inf_apply Seminorm.inf_apply noncomputable instance instLattice : Lattice (Seminorm π•œ E) := { Seminorm.instSemilatticeSup with inf := (Β· βŠ“ Β·) inf_le_left := fun p q x => ciInf_le_of_le bddBelow_range_add x <| by simp only [sub_self, map_zero, add_zero]; rfl inf_le_right := fun p q x => ciInf_le_of_le bddBelow_range_add 0 <| by simp only [sub_self, map_zero, zero_add, sub_zero]; rfl le_inf := fun a b c hab hac x => le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) } theorem smul_inf [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ“ q) = r β€’ p βŠ“ r β€’ q := by ext simp_rw [smul_apply, inf_apply, smul_apply, ← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add] #align seminorm.smul_inf Seminorm.smul_inf section Classical open Classical /-- We define the supremum of an arbitrary subset of `Seminorm π•œ E` as follows: * if `s` is `BddAbove` *as a set of functions `E β†’ ℝ`* (that is, if `s` is pointwise bounded above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a seminorm. * otherwise, we take the zero seminorm `βŠ₯`. There are two things worth mentioning here: * First, it is not trivial at first that `s` being bounded above *by a function* implies being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make the case disjunction on `BddAbove ((↑) '' s : Set (E β†’ ℝ))` and not `BddAbove s`. * Since the pointwise `Sup` already gives `0` at points where a family of functions is not bounded above, one could hope that just using the pointwise `Sup` would work here, without the need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can give a function which does *not* satisfy the seminorm axioms (typically sub-additivity). -/ noncomputable instance instSupSet : SupSet (Seminorm π•œ E) where sSup s := if h : BddAbove ((↑) '' s : Set (E β†’ ℝ)) then { toFun := ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) map_zero' := by rw [iSup_apply, ← @Real.ciSup_const_zero s] congr! rename_i _ _ _ i exact map_zero i.1 add_le' := fun x y => by rcases h with ⟨q, hq⟩ obtain rfl | h := s.eq_empty_or_nonempty Β· simp [Real.ciSup_empty] haveI : Nonempty ↑s := h.coe_sort simp only [iSup_apply] refine' ciSup_le fun i => ((i : Seminorm π•œ E).add_le' x y).trans <| add_le_add -- Porting note: `f` is provided to force `Subtype.val` to appear. -- A type ascription on `_` would have also worked, but would have been more verbose. (le_ciSup (f := fun i => (Subtype.val i : Seminorm π•œ E).toFun x) ⟨q x, _⟩ i) (le_ciSup (f := fun i => (Subtype.val i : Seminorm π•œ E).toFun y) ⟨q y, _⟩ i) <;> rw [mem_upperBounds, forall_range_iff] <;> exact fun j => hq (mem_image_of_mem _ j.2) _ neg' := fun x => by simp only [iSup_apply] congr! 2 rename_i _ _ _ i exact i.1.neg' _ smul' := fun a x => by simp only [iSup_apply] rw [← smul_eq_mul, Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π•œ E) x] congr! rename_i _ _ _ i exact i.1.smul' a x } else βŠ₯ protected theorem coe_sSup_eq' {s : Set <| Seminorm π•œ E} (hs : BddAbove ((↑) '' s : Set (E β†’ ℝ))) : ↑(sSup s) = ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) := congr_arg _ (dif_pos hs) #align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq' protected theorem bddAbove_iff {s : Set <| Seminorm π•œ E} : BddAbove s ↔ BddAbove ((↑) '' s : Set (E β†’ ℝ)) := ⟨fun ⟨q, hq⟩ => ⟨q, ball_image_of_ball fun p hp => hq hp⟩, fun H => ⟨sSup s, fun p hp x => by dsimp rw [Seminorm.coe_sSup_eq' H, iSup_apply] rcases H with ⟨q, hq⟩ exact le_ciSup ⟨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) x⟩ ⟨p, hp⟩⟩⟩ #align seminorm.bdd_above_iff Seminorm.bddAbove_iff protected theorem bddAbove_range_iff {p : ΞΉ β†’ Seminorm π•œ E} : BddAbove (range p) ↔ βˆ€ x, BddAbove (range fun i ↦ p i x) := by rw [Seminorm.bddAbove_iff, ← range_comp, bddAbove_range_pi]; rfl protected theorem coe_sSup_eq {s : Set <| Seminorm π•œ E} (hs : BddAbove s) : ↑(sSup s) = ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) := Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs) #align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β†’ Seminorm π•œ E} (hp : BddAbove (range p)) : ↑(⨆ i, p i) = ⨆ i, ((p i : Seminorm π•œ E) : E β†’ ℝ) := by rw [← sSup_range, Seminorm.coe_sSup_eq hp] exact iSup_range' (fun p : Seminorm π•œ E => (p : E β†’ ℝ)) p #align seminorm.coe_supr_eq Seminorm.coe_iSup_eq protected theorem sSup_apply {s : Set (Seminorm π•œ E)} (hp : BddAbove s) {x : E} : (sSup s) x = ⨆ p : s, (p : E β†’ ℝ) x := by rw [Seminorm.coe_sSup_eq hp, iSup_apply] protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β†’ Seminorm π•œ E} (hp : BddAbove (range p)) {x : E} : (⨆ i, p i) x = ⨆ i, p i x := by rw [Seminorm.coe_iSup_eq hp, iSup_apply] protected theorem sSup_empty : sSup (βˆ… : Set (Seminorm π•œ E)) = βŠ₯ := by ext rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty] rfl private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π•œ E)) (hs₁ : BddAbove s) (hsβ‚‚ : s.Nonempty) : IsLUB s (sSup s) := by refine' ⟨fun p hp x => _, fun p hp x => _⟩ <;> haveI : Nonempty ↑s := hsβ‚‚.coe_sort <;> dsimp <;> rw [Seminorm.coe_sSup_eq hs₁, iSup_apply] Β· rcases hs₁ with ⟨q, hq⟩ exact le_ciSup ⟨q x, forall_range_iff.mpr fun i : s => hq i.2 x⟩ ⟨p, hp⟩ Β· exact ciSup_le fun q => hp q.2 x /-- `Seminorm π•œ E` is a conditionally complete lattice. Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you need to use `sInf` on seminorms, then you should probably provide a more workable definition first, but this is unlikely to happen so we keep the "bad" definition for now. -/ noncomputable instance instConditionallyCompleteLattice : ConditionallyCompleteLattice (Seminorm π•œ E) := conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π•œ E) Seminorm.isLUB_sSup end Classical end NormedField /-! ### Seminorm ball -/ section SeminormedRing variable [SeminormedRing π•œ] section AddCommGroup variable [AddCommGroup E] section SMul variable [SMul π•œ E] (p : Seminorm π•œ E) /-- The ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y` with `p (y - x) < r`. -/ def ball (x : E) (r : ℝ) := { y : E | p (y - x) < r } #align seminorm.ball Seminorm.ball /-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y` with `p (y - x) ≀ r`. -/ def closedBall (x : E) (r : ℝ) := { y : E | p (y - x) ≀ r } #align seminorm.closed_ball Seminorm.closedBall variable {x y : E} {r : ℝ} @[simp] theorem mem_ball : y ∈ ball p x r ↔ p (y - x) < r := Iff.rfl #align seminorm.mem_ball Seminorm.mem_ball @[simp] theorem mem_closedBall : y ∈ closedBall p x r ↔ p (y - x) ≀ r := Iff.rfl #align seminorm.mem_closed_ball Seminorm.mem_closedBall theorem mem_ball_self (hr : 0 < r) : x ∈ ball p x r := by
simp [hr]
theorem mem_ball_self (hr : 0 < r) : x ∈ ball p x r := by
Mathlib.Analysis.Seminorm.696_0.ywwMCgoKeIFKDZ3
theorem mem_ball_self (hr : 0 < r) : x ∈ 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✝² : SeminormedRing π•œ inst✝¹ : AddCommGroup E inst✝ : SMul π•œ E p : Seminorm π•œ E x y : E r : ℝ hr : 0 ≀ r ⊒ x ∈ 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]
theorem mem_closedBall_self (hr : 0 ≀ r) : x ∈ closedBall p x r := by
Mathlib.Analysis.Seminorm.699_0.ywwMCgoKeIFKDZ3
theorem mem_closedBall_self (hr : 0 ≀ r) : x ∈ 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✝² : SeminormedRing π•œ inst✝¹ : AddCommGroup E inst✝ : SMul π•œ E p : Seminorm π•œ E x y : E r : ℝ ⊒ y ∈ ball p 0 r ↔ p y < r
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, YaΓ«l Dillies, Moritz Doll -/ import Mathlib.Data.Real.Pointwise import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.LocallyConvex.Basic import Mathlib.Analysis.Normed.Group.AddTorsor #align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c" /-! # Seminorms This file defines seminorms. A seminorm is a function to the reals which is positive-semidefinite, absolutely homogeneous, and subadditive. They are closely related to convex sets, and a topological vector space is locally convex if and only if its topology is induced by a family of seminorms. ## Main declarations For a module over a normed ring: * `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and subadditive. * `normSeminorm π•œ E`: The norm on `E` as a seminorm. ## References * [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966] ## Tags seminorm, locally convex, LCTVS -/ set_option autoImplicit true open NormedField Set Filter open scoped BigOperators NNReal Pointwise Topology Uniformity variable {R R' π•œ π•œβ‚‚ π•œβ‚ƒ 𝕝 E Eβ‚‚ E₃ F G ΞΉ : Type*} /-- A seminorm on a module over a normed ring is a function to the reals that is positive semidefinite, positive homogeneous, and subadditive. -/ structure Seminorm (π•œ : Type*) (E : Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminorm E where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ smul' : βˆ€ (a : π•œ) (x : E), toFun (a β€’ x) = β€–aβ€– * toFun x #align seminorm Seminorm attribute [nolint docBlame] Seminorm.toAddGroupSeminorm /-- `SeminormClass F π•œ E` states that `F` is a type of seminorms on the `π•œ`-module `E`. You should extend this class when you extend `Seminorm`. -/ class SeminormClass (F : Type*) (π•œ E : outParam <| Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminormClass F E ℝ where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ map_smul_eq_mul (f : F) (a : π•œ) (x : E) : f (a β€’ x) = β€–aβ€– * f x #align seminorm_class SeminormClass export SeminormClass (map_smul_eq_mul) -- Porting note: dangerous instances no longer exist -- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass section Of /-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a `SeminormedRing π•œ`. -/ def Seminorm.of [SeminormedRing π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (add_le : βˆ€ x y : E, f (x + y) ≀ f x + f y) (smul : βˆ€ (a : π•œ) (x : E), f (a β€’ x) = β€–aβ€– * f x) : Seminorm π•œ E where toFun := f map_zero' := by rw [← zero_smul π•œ (0 : E), smul, norm_zero, zero_mul] add_le' := add_le smul' := smul neg' x := by rw [← neg_one_smul π•œ, smul, norm_neg, ← smul, one_smul] #align seminorm.of Seminorm.of /-- Alternative constructor for a `Seminorm` over a normed field `π•œ` that only assumes `f 0 = 0` and an inequality for the scalar multiplication. -/ def Seminorm.ofSMulLE [NormedField π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (map_zero : f 0 = 0) (add_le : βˆ€ x y, f (x + y) ≀ f x + f y) (smul_le : βˆ€ (r : π•œ) (x), f (r β€’ x) ≀ β€–rβ€– * f x) : Seminorm π•œ E := Seminorm.of f add_le fun r x => by refine' le_antisymm (smul_le r x) _ by_cases h : r = 0 Β· simp [h, map_zero] rw [← mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))] rw [inv_mul_cancel_leftβ‚€ (norm_ne_zero_iff.mpr h)] specialize smul_le r⁻¹ (r β€’ x) rw [norm_inv] at smul_le convert smul_le simp [h] #align seminorm.of_smul_le Seminorm.ofSMulLE end Of namespace Seminorm section SeminormedRing variable [SeminormedRing π•œ] section AddGroup variable [AddGroup E] section SMul variable [SMul π•œ E] instance instSeminormClass : SeminormClass (Seminorm π•œ E) π•œ E where coe f := f.toFun coe_injective' f g h := by rcases f with ⟨⟨_⟩⟩ rcases g with ⟨⟨_⟩⟩ congr map_zero f := f.map_zero' map_add_le_add f := f.add_le' map_neg_eq_map f := f.neg' map_smul_eq_mul f := f.smul' #align seminorm.seminorm_class Seminorm.instSeminormClass /-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/ instance instCoeFun : CoeFun (Seminorm π•œ E) fun _ => E β†’ ℝ := FunLike.hasCoeToFun @[ext] theorem ext {p q : Seminorm π•œ E} (h : βˆ€ x, (p : E β†’ ℝ) x = q x) : p = q := FunLike.ext p q h #align seminorm.ext Seminorm.ext instance instZero : Zero (Seminorm π•œ E) := ⟨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with smul' := fun _ _ => (mul_zero _).symm }⟩ @[simp] theorem coe_zero : ⇑(0 : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_zero Seminorm.coe_zero @[simp] theorem zero_apply (x : E) : (0 : Seminorm π•œ E) x = 0 := rfl #align seminorm.zero_apply Seminorm.zero_apply instance : Inhabited (Seminorm π•œ E) := ⟨0⟩ variable (p : Seminorm π•œ E) (c : π•œ) (x y : E) (r : ℝ) /-- Any action on `ℝ` which factors through `ℝβ‰₯0` applies to a seminorm. -/ instance instSMul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : SMul R (Seminorm π•œ E) where smul r p := { r β€’ p.toAddGroupSeminorm with toFun := fun x => r β€’ p x smul' := fun _ _ => by simp only [← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul] rw [map_smul_eq_mul, mul_left_comm] } instance [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] [SMul R' ℝ] [SMul R' ℝβ‰₯0] [IsScalarTower R' ℝβ‰₯0 ℝ] [SMul R R'] [IsScalarTower R R' ℝ] : IsScalarTower R R' (Seminorm π•œ E) where smul_assoc r a p := ext fun x => smul_assoc r a (p x) theorem coe_smul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) : ⇑(r β€’ p) = r β€’ ⇑p := rfl #align seminorm.coe_smul Seminorm.coe_smul @[simp] theorem smul_apply [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) (x : E) : (r β€’ p) x = r β€’ p x := rfl #align seminorm.smul_apply Seminorm.smul_apply instance instAdd : Add (Seminorm π•œ E) where add p q := { p.toAddGroupSeminorm + q.toAddGroupSeminorm with toFun := fun x => p x + q x smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] } theorem coe_add (p q : Seminorm π•œ E) : ⇑(p + q) = p + q := rfl #align seminorm.coe_add Seminorm.coe_add @[simp] theorem add_apply (p q : Seminorm π•œ E) (x : E) : (p + q) x = p x + q x := rfl #align seminorm.add_apply Seminorm.add_apply instance instAddMonoid : AddMonoid (Seminorm π•œ E) := FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π•œ E) := FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl instance instMulAction [Monoid R] [MulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : MulAction R (Seminorm π•œ E) := FunLike.coe_injective.mulAction _ (by intros; rfl) variable (π•œ E) /-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π•œ E` is a module. -/ @[simps] def coeFnAddMonoidHom : AddMonoidHom (Seminorm π•œ E) (E β†’ ℝ) where toFun := (↑) map_zero' := coe_zero map_add' := coe_add #align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π•œ E) := show @Function.Injective (Seminorm π•œ E) (E β†’ ℝ) (↑) from FunLike.coe_injective #align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective variable {π•œ E} instance instDistribMulAction [Monoid R] [DistribMulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : DistribMulAction R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).distribMulAction _ (by intros; rfl) instance instModule [Semiring R] [Module R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : Module R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).module R _ (by intros; rfl) instance instSup : Sup (Seminorm π•œ E) where sup p q := { p.toAddGroupSeminorm βŠ” q.toAddGroupSeminorm with toFun := p βŠ” q smul' := fun x v => (congr_argβ‚‚ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <| (mul_max_of_nonneg _ _ <| norm_nonneg x).symm } @[simp] theorem coe_sup (p q : Seminorm π•œ E) : ⇑(p βŠ” q) = (p : E β†’ ℝ) βŠ” (q : E β†’ ℝ) := rfl #align seminorm.coe_sup Seminorm.coe_sup theorem sup_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ” q) x = p x βŠ” q x := rfl #align seminorm.sup_apply Seminorm.sup_apply theorem smul_sup [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ” q) = r β€’ p βŠ” r β€’ q := have real.smul_max : βˆ€ x y : ℝ, r β€’ max x y = max (r β€’ x) (r β€’ y) := fun x y => by simpa only [← smul_eq_mul, ← NNReal.smul_def, smul_one_smul ℝβ‰₯0 r (_ : ℝ)] using mul_max_of_nonneg x y (r β€’ (1 : ℝβ‰₯0) : ℝβ‰₯0).coe_nonneg ext fun x => real.smul_max _ _ #align seminorm.smul_sup Seminorm.smul_sup instance instPartialOrder : PartialOrder (Seminorm π•œ E) := PartialOrder.lift _ FunLike.coe_injective @[simp, norm_cast] theorem coe_le_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) ≀ q ↔ p ≀ q := Iff.rfl #align seminorm.coe_le_coe Seminorm.coe_le_coe @[simp, norm_cast] theorem coe_lt_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) < q ↔ p < q := Iff.rfl #align seminorm.coe_lt_coe Seminorm.coe_lt_coe theorem le_def {p q : Seminorm π•œ E} : p ≀ q ↔ βˆ€ x, p x ≀ q x := Iff.rfl #align seminorm.le_def Seminorm.le_def theorem lt_def {p q : Seminorm π•œ E} : p < q ↔ p ≀ q ∧ βˆƒ x, p x < q x := @Pi.lt_def _ _ _ p q #align seminorm.lt_def Seminorm.lt_def instance instSemilatticeSup : SemilatticeSup (Seminorm π•œ E) := Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup end SMul end AddGroup section Module variable [SeminormedRing π•œβ‚‚] [SeminormedRing π•œβ‚ƒ] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable {σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₂₃] variable {σ₁₃ : π•œ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₁₃] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [AddCommGroup E₃] variable [AddCommGroup F] [AddCommGroup G] variable [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] [Module π•œβ‚ƒ E₃] [Module π•œ F] [Module π•œ G] -- Porting note: even though this instance is found immediately by typeclass search, -- it seems to be needed below!? noncomputable instance smul_nnreal_real : SMul ℝβ‰₯0 ℝ := inferInstance variable [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] /-- Composition of a seminorm with a linear map is a seminorm. -/ def comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œ E := { p.toAddGroupSeminorm.comp f.toAddMonoidHom with toFun := fun x => p (f x) -- Porting note: the `simp only` below used to be part of the `rw`. -- I'm not sure why this change was needed, and am worried by it! smul' := fun _ _ => by simp only [map_smulβ‚›β‚—]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] } #align seminorm.comp Seminorm.comp theorem coe_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : ⇑(p.comp f) = p ∘ f := rfl #align seminorm.coe_comp Seminorm.coe_comp @[simp] theorem comp_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (x : E) : (p.comp f) x = p (f x) := rfl #align seminorm.comp_apply Seminorm.comp_apply @[simp] theorem comp_id (p : Seminorm π•œ E) : p.comp LinearMap.id = p := ext fun _ => rfl #align seminorm.comp_id Seminorm.comp_id @[simp] theorem comp_zero (p : Seminorm π•œβ‚‚ Eβ‚‚) : p.comp (0 : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) = 0 := ext fun _ => map_zero p #align seminorm.comp_zero Seminorm.comp_zero @[simp] theorem zero_comp (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (0 : Seminorm π•œβ‚‚ Eβ‚‚).comp f = 0 := ext fun _ => rfl #align seminorm.zero_comp Seminorm.zero_comp theorem comp_comp [RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] (p : Seminorm π•œβ‚ƒ E₃) (g : Eβ‚‚ β†’β‚›β‚—[σ₂₃] E₃) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (g.comp f) = (p.comp g).comp f := ext fun _ => rfl #align seminorm.comp_comp Seminorm.comp_comp theorem add_comp (p q : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (p + q).comp f = p.comp f + q.comp f := ext fun _ => rfl #align seminorm.add_comp Seminorm.add_comp theorem comp_add_le (p : Seminorm π•œβ‚‚ Eβ‚‚) (f g : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (f + g) ≀ p.comp f + p.comp g := fun _ => map_add_le_add p _ _ #align seminorm.comp_add_le Seminorm.comp_add_le theorem smul_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : R) : (c β€’ p).comp f = c β€’ p.comp f := ext fun _ => rfl #align seminorm.smul_comp Seminorm.smul_comp theorem comp_mono {p q : Seminorm π•œβ‚‚ Eβ‚‚} (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (hp : p ≀ q) : p.comp f ≀ q.comp f := fun _ => hp _ #align seminorm.comp_mono Seminorm.comp_mono /-- The composition as an `AddMonoidHom`. -/ @[simps] def pullback (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œβ‚‚ Eβ‚‚ β†’+ Seminorm π•œ E where toFun := fun p => p.comp f map_zero' := zero_comp f map_add' := fun p q => add_comp p q f #align seminorm.pullback Seminorm.pullback instance instOrderBot : OrderBot (Seminorm π•œ E) where bot := 0 bot_le := map_nonneg @[simp] theorem coe_bot : ⇑(βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_bot Seminorm.coe_bot theorem bot_eq_zero : (βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.bot_eq_zero Seminorm.bot_eq_zero theorem smul_le_smul {p q : Seminorm π•œ E} {a b : ℝβ‰₯0} (hpq : p ≀ q) (hab : a ≀ b) : a β€’ p ≀ b β€’ q := by simp_rw [le_def] intro x exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b) #align seminorm.smul_le_smul Seminorm.smul_le_smul theorem finset_sup_apply (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = ↑(s.sup fun i => ⟨p i x, map_nonneg (p i) x⟩ : ℝβ‰₯0) := by induction' s using Finset.cons_induction_on with a s ha ih Β· rw [Finset.sup_empty, Finset.sup_empty, coe_bot, _root_.bot_eq_zero, Pi.zero_apply] norm_cast Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max, NNReal.coe_max, NNReal.coe_mk, ih] #align seminorm.finset_sup_apply Seminorm.finset_sup_apply theorem exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) : βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.exists_mem_eq_sup s hs (fun i ↦ (⟨p i x, map_nonneg _ _⟩ : ℝβ‰₯0)) with ⟨i, hi, hix⟩ rw [finset_sup_apply] exact ⟨i, hi, congr_arg _ hix⟩ theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = 0 ∨ βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.eq_empty_or_nonempty s with (rfl|hs) Β· left; rfl Β· right; exact exists_apply_eq_finset_sup p hs x theorem finset_sup_smul (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (C : ℝβ‰₯0) : s.sup (C β€’ p) = C β€’ s.sup p := by ext x rw [smul_apply, finset_sup_apply, finset_sup_apply] symm exact congr_arg ((↑) : ℝβ‰₯0 β†’ ℝ) (NNReal.mul_finset_sup C s (fun i ↦ ⟨p i x, map_nonneg _ _⟩)) theorem finset_sup_le_sum (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) : s.sup p ≀ βˆ‘ i in s, p i := by classical refine' Finset.sup_le_iff.mpr _ intro i hi rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left] exact bot_le #align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum theorem finset_sup_apply_le {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 ≀ a) (h : βˆ€ i, i ∈ s β†’ p i x ≀ a) : s.sup p x ≀ a := by lift a to ℝβ‰₯0 using ha rw [finset_sup_apply, NNReal.coe_le_coe] exact Finset.sup_le h #align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le theorem le_finset_sup_apply {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {i : ΞΉ} (hi : i ∈ s) : p i x ≀ s.sup p x := (Finset.le_sup hi : p i ≀ s.sup p) x theorem finset_sup_apply_lt {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 < a) (h : βˆ€ i, i ∈ s β†’ p i x < a) : s.sup p x < a := by lift a to ℝβ‰₯0 using ha.le rw [finset_sup_apply, NNReal.coe_lt_coe, Finset.sup_lt_iff] Β· exact h Β· exact NNReal.coe_pos.mpr ha #align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt theorem norm_sub_map_le_sub (p : Seminorm π•œ E) (x y : E) : β€–p x - p yβ€– ≀ p (x - y) := abs_sub_map_le_sub p x y #align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub end Module end SeminormedRing section SeminormedCommRing variable [SeminormedRing π•œ] [SeminormedCommRing π•œβ‚‚] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] theorem comp_smul (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) : p.comp (c β€’ f) = β€–cβ€–β‚Š β€’ p.comp f := ext fun _ => by rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm, smul_eq_mul, comp_apply] #align seminorm.comp_smul Seminorm.comp_smul theorem comp_smul_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) (x : E) : p.comp (c β€’ f) x = β€–cβ€– * p (f x) := map_smul_eq_mul p _ _ #align seminorm.comp_smul_apply Seminorm.comp_smul_apply end SeminormedCommRing section NormedField variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] {p q : Seminorm π•œ E} {x : E} /-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/ theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) := ⟨0, by rintro _ ⟨x, rfl⟩ dsimp; positivity⟩ #align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add noncomputable instance instInf : Inf (Seminorm π•œ E) where inf p q := { p.toAddGroupSeminorm βŠ“ q.toAddGroupSeminorm with toFun := fun x => β¨… u : E, p u + q (x - u) smul' := by intro a x obtain rfl | ha := eq_or_ne a 0 Β· rw [norm_zero, zero_mul, zero_smul] refine' ciInf_eq_of_forall_ge_of_forall_gt_exists_lt -- Porting note: the following was previously `fun i => by positivity` (fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _)) fun x hx => ⟨0, by rwa [map_zero, sub_zero, map_zero, add_zero]⟩ simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, ← map_smul_eq_mul p, ← map_smul_eq_mul q, smul_sub] refine' Function.Surjective.iInf_congr ((a⁻¹ β€’ Β·) : E β†’ E) (fun u => ⟨a β€’ u, inv_smul_smulβ‚€ ha u⟩) fun u => _ rw [smul_inv_smulβ‚€ ha] } @[simp] theorem inf_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ“ q) x = β¨… u : E, p u + q (x - u) := rfl #align seminorm.inf_apply Seminorm.inf_apply noncomputable instance instLattice : Lattice (Seminorm π•œ E) := { Seminorm.instSemilatticeSup with inf := (Β· βŠ“ Β·) inf_le_left := fun p q x => ciInf_le_of_le bddBelow_range_add x <| by simp only [sub_self, map_zero, add_zero]; rfl inf_le_right := fun p q x => ciInf_le_of_le bddBelow_range_add 0 <| by simp only [sub_self, map_zero, zero_add, sub_zero]; rfl le_inf := fun a b c hab hac x => le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) } theorem smul_inf [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ“ q) = r β€’ p βŠ“ r β€’ q := by ext simp_rw [smul_apply, inf_apply, smul_apply, ← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add] #align seminorm.smul_inf Seminorm.smul_inf section Classical open Classical /-- We define the supremum of an arbitrary subset of `Seminorm π•œ E` as follows: * if `s` is `BddAbove` *as a set of functions `E β†’ ℝ`* (that is, if `s` is pointwise bounded above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a seminorm. * otherwise, we take the zero seminorm `βŠ₯`. There are two things worth mentioning here: * First, it is not trivial at first that `s` being bounded above *by a function* implies being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make the case disjunction on `BddAbove ((↑) '' s : Set (E β†’ ℝ))` and not `BddAbove s`. * Since the pointwise `Sup` already gives `0` at points where a family of functions is not bounded above, one could hope that just using the pointwise `Sup` would work here, without the need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can give a function which does *not* satisfy the seminorm axioms (typically sub-additivity). -/ noncomputable instance instSupSet : SupSet (Seminorm π•œ E) where sSup s := if h : BddAbove ((↑) '' s : Set (E β†’ ℝ)) then { toFun := ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) map_zero' := by rw [iSup_apply, ← @Real.ciSup_const_zero s] congr! rename_i _ _ _ i exact map_zero i.1 add_le' := fun x y => by rcases h with ⟨q, hq⟩ obtain rfl | h := s.eq_empty_or_nonempty Β· simp [Real.ciSup_empty] haveI : Nonempty ↑s := h.coe_sort simp only [iSup_apply] refine' ciSup_le fun i => ((i : Seminorm π•œ E).add_le' x y).trans <| add_le_add -- Porting note: `f` is provided to force `Subtype.val` to appear. -- A type ascription on `_` would have also worked, but would have been more verbose. (le_ciSup (f := fun i => (Subtype.val i : Seminorm π•œ E).toFun x) ⟨q x, _⟩ i) (le_ciSup (f := fun i => (Subtype.val i : Seminorm π•œ E).toFun y) ⟨q y, _⟩ i) <;> rw [mem_upperBounds, forall_range_iff] <;> exact fun j => hq (mem_image_of_mem _ j.2) _ neg' := fun x => by simp only [iSup_apply] congr! 2 rename_i _ _ _ i exact i.1.neg' _ smul' := fun a x => by simp only [iSup_apply] rw [← smul_eq_mul, Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π•œ E) x] congr! rename_i _ _ _ i exact i.1.smul' a x } else βŠ₯ protected theorem coe_sSup_eq' {s : Set <| Seminorm π•œ E} (hs : BddAbove ((↑) '' s : Set (E β†’ ℝ))) : ↑(sSup s) = ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) := congr_arg _ (dif_pos hs) #align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq' protected theorem bddAbove_iff {s : Set <| Seminorm π•œ E} : BddAbove s ↔ BddAbove ((↑) '' s : Set (E β†’ ℝ)) := ⟨fun ⟨q, hq⟩ => ⟨q, ball_image_of_ball fun p hp => hq hp⟩, fun H => ⟨sSup s, fun p hp x => by dsimp rw [Seminorm.coe_sSup_eq' H, iSup_apply] rcases H with ⟨q, hq⟩ exact le_ciSup ⟨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) x⟩ ⟨p, hp⟩⟩⟩ #align seminorm.bdd_above_iff Seminorm.bddAbove_iff protected theorem bddAbove_range_iff {p : ΞΉ β†’ Seminorm π•œ E} : BddAbove (range p) ↔ βˆ€ x, BddAbove (range fun i ↦ p i x) := by rw [Seminorm.bddAbove_iff, ← range_comp, bddAbove_range_pi]; rfl protected theorem coe_sSup_eq {s : Set <| Seminorm π•œ E} (hs : BddAbove s) : ↑(sSup s) = ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) := Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs) #align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β†’ Seminorm π•œ E} (hp : BddAbove (range p)) : ↑(⨆ i, p i) = ⨆ i, ((p i : Seminorm π•œ E) : E β†’ ℝ) := by rw [← sSup_range, Seminorm.coe_sSup_eq hp] exact iSup_range' (fun p : Seminorm π•œ E => (p : E β†’ ℝ)) p #align seminorm.coe_supr_eq Seminorm.coe_iSup_eq protected theorem sSup_apply {s : Set (Seminorm π•œ E)} (hp : BddAbove s) {x : E} : (sSup s) x = ⨆ p : s, (p : E β†’ ℝ) x := by rw [Seminorm.coe_sSup_eq hp, iSup_apply] protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β†’ Seminorm π•œ E} (hp : BddAbove (range p)) {x : E} : (⨆ i, p i) x = ⨆ i, p i x := by rw [Seminorm.coe_iSup_eq hp, iSup_apply] protected theorem sSup_empty : sSup (βˆ… : Set (Seminorm π•œ E)) = βŠ₯ := by ext rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty] rfl private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π•œ E)) (hs₁ : BddAbove s) (hsβ‚‚ : s.Nonempty) : IsLUB s (sSup s) := by refine' ⟨fun p hp x => _, fun p hp x => _⟩ <;> haveI : Nonempty ↑s := hsβ‚‚.coe_sort <;> dsimp <;> rw [Seminorm.coe_sSup_eq hs₁, iSup_apply] Β· rcases hs₁ with ⟨q, hq⟩ exact le_ciSup ⟨q x, forall_range_iff.mpr fun i : s => hq i.2 x⟩ ⟨p, hp⟩ Β· exact ciSup_le fun q => hp q.2 x /-- `Seminorm π•œ E` is a conditionally complete lattice. Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you need to use `sInf` on seminorms, then you should probably provide a more workable definition first, but this is unlikely to happen so we keep the "bad" definition for now. -/ noncomputable instance instConditionallyCompleteLattice : ConditionallyCompleteLattice (Seminorm π•œ E) := conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π•œ E) Seminorm.isLUB_sSup end Classical end NormedField /-! ### Seminorm ball -/ section SeminormedRing variable [SeminormedRing π•œ] section AddCommGroup variable [AddCommGroup E] section SMul variable [SMul π•œ E] (p : Seminorm π•œ E) /-- The ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y` with `p (y - x) < r`. -/ def ball (x : E) (r : ℝ) := { y : E | p (y - x) < r } #align seminorm.ball Seminorm.ball /-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y` with `p (y - x) ≀ r`. -/ def closedBall (x : E) (r : ℝ) := { y : E | p (y - x) ≀ r } #align seminorm.closed_ball Seminorm.closedBall variable {x y : E} {r : ℝ} @[simp] theorem mem_ball : y ∈ ball p x r ↔ p (y - x) < r := Iff.rfl #align seminorm.mem_ball Seminorm.mem_ball @[simp] theorem mem_closedBall : y ∈ closedBall p x r ↔ p (y - x) ≀ r := Iff.rfl #align seminorm.mem_closed_ball Seminorm.mem_closedBall theorem mem_ball_self (hr : 0 < r) : x ∈ ball p x r := by simp [hr] #align seminorm.mem_ball_self Seminorm.mem_ball_self theorem mem_closedBall_self (hr : 0 ≀ r) : x ∈ closedBall p x r := by simp [hr] #align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self theorem mem_ball_zero : y ∈ ball p 0 r ↔ p y < r := by
rw [mem_ball, sub_zero]
theorem mem_ball_zero : y ∈ ball p 0 r ↔ p y < r := by
Mathlib.Analysis.Seminorm.702_0.ywwMCgoKeIFKDZ3
theorem mem_ball_zero : y ∈ ball p 0 r ↔ p y < r
Mathlib_Analysis_Seminorm
R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : SeminormedRing π•œ inst✝¹ : AddCommGroup E inst✝ : SMul π•œ E p : Seminorm π•œ E x y : E r : ℝ ⊒ y ∈ closedBall p 0 r ↔ p y ≀ r
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, YaΓ«l Dillies, Moritz Doll -/ import Mathlib.Data.Real.Pointwise import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.LocallyConvex.Basic import Mathlib.Analysis.Normed.Group.AddTorsor #align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c" /-! # Seminorms This file defines seminorms. A seminorm is a function to the reals which is positive-semidefinite, absolutely homogeneous, and subadditive. They are closely related to convex sets, and a topological vector space is locally convex if and only if its topology is induced by a family of seminorms. ## Main declarations For a module over a normed ring: * `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and subadditive. * `normSeminorm π•œ E`: The norm on `E` as a seminorm. ## References * [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966] ## Tags seminorm, locally convex, LCTVS -/ set_option autoImplicit true open NormedField Set Filter open scoped BigOperators NNReal Pointwise Topology Uniformity variable {R R' π•œ π•œβ‚‚ π•œβ‚ƒ 𝕝 E Eβ‚‚ E₃ F G ΞΉ : Type*} /-- A seminorm on a module over a normed ring is a function to the reals that is positive semidefinite, positive homogeneous, and subadditive. -/ structure Seminorm (π•œ : Type*) (E : Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminorm E where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ smul' : βˆ€ (a : π•œ) (x : E), toFun (a β€’ x) = β€–aβ€– * toFun x #align seminorm Seminorm attribute [nolint docBlame] Seminorm.toAddGroupSeminorm /-- `SeminormClass F π•œ E` states that `F` is a type of seminorms on the `π•œ`-module `E`. You should extend this class when you extend `Seminorm`. -/ class SeminormClass (F : Type*) (π•œ E : outParam <| Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminormClass F E ℝ where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ map_smul_eq_mul (f : F) (a : π•œ) (x : E) : f (a β€’ x) = β€–aβ€– * f x #align seminorm_class SeminormClass export SeminormClass (map_smul_eq_mul) -- Porting note: dangerous instances no longer exist -- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass section Of /-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a `SeminormedRing π•œ`. -/ def Seminorm.of [SeminormedRing π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (add_le : βˆ€ x y : E, f (x + y) ≀ f x + f y) (smul : βˆ€ (a : π•œ) (x : E), f (a β€’ x) = β€–aβ€– * f x) : Seminorm π•œ E where toFun := f map_zero' := by rw [← zero_smul π•œ (0 : E), smul, norm_zero, zero_mul] add_le' := add_le smul' := smul neg' x := by rw [← neg_one_smul π•œ, smul, norm_neg, ← smul, one_smul] #align seminorm.of Seminorm.of /-- Alternative constructor for a `Seminorm` over a normed field `π•œ` that only assumes `f 0 = 0` and an inequality for the scalar multiplication. -/ def Seminorm.ofSMulLE [NormedField π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (map_zero : f 0 = 0) (add_le : βˆ€ x y, f (x + y) ≀ f x + f y) (smul_le : βˆ€ (r : π•œ) (x), f (r β€’ x) ≀ β€–rβ€– * f x) : Seminorm π•œ E := Seminorm.of f add_le fun r x => by refine' le_antisymm (smul_le r x) _ by_cases h : r = 0 Β· simp [h, map_zero] rw [← mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))] rw [inv_mul_cancel_leftβ‚€ (norm_ne_zero_iff.mpr h)] specialize smul_le r⁻¹ (r β€’ x) rw [norm_inv] at smul_le convert smul_le simp [h] #align seminorm.of_smul_le Seminorm.ofSMulLE end Of namespace Seminorm section SeminormedRing variable [SeminormedRing π•œ] section AddGroup variable [AddGroup E] section SMul variable [SMul π•œ E] instance instSeminormClass : SeminormClass (Seminorm π•œ E) π•œ E where coe f := f.toFun coe_injective' f g h := by rcases f with ⟨⟨_⟩⟩ rcases g with ⟨⟨_⟩⟩ congr map_zero f := f.map_zero' map_add_le_add f := f.add_le' map_neg_eq_map f := f.neg' map_smul_eq_mul f := f.smul' #align seminorm.seminorm_class Seminorm.instSeminormClass /-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/ instance instCoeFun : CoeFun (Seminorm π•œ E) fun _ => E β†’ ℝ := FunLike.hasCoeToFun @[ext] theorem ext {p q : Seminorm π•œ E} (h : βˆ€ x, (p : E β†’ ℝ) x = q x) : p = q := FunLike.ext p q h #align seminorm.ext Seminorm.ext instance instZero : Zero (Seminorm π•œ E) := ⟨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with smul' := fun _ _ => (mul_zero _).symm }⟩ @[simp] theorem coe_zero : ⇑(0 : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_zero Seminorm.coe_zero @[simp] theorem zero_apply (x : E) : (0 : Seminorm π•œ E) x = 0 := rfl #align seminorm.zero_apply Seminorm.zero_apply instance : Inhabited (Seminorm π•œ E) := ⟨0⟩ variable (p : Seminorm π•œ E) (c : π•œ) (x y : E) (r : ℝ) /-- Any action on `ℝ` which factors through `ℝβ‰₯0` applies to a seminorm. -/ instance instSMul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : SMul R (Seminorm π•œ E) where smul r p := { r β€’ p.toAddGroupSeminorm with toFun := fun x => r β€’ p x smul' := fun _ _ => by simp only [← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul] rw [map_smul_eq_mul, mul_left_comm] } instance [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] [SMul R' ℝ] [SMul R' ℝβ‰₯0] [IsScalarTower R' ℝβ‰₯0 ℝ] [SMul R R'] [IsScalarTower R R' ℝ] : IsScalarTower R R' (Seminorm π•œ E) where smul_assoc r a p := ext fun x => smul_assoc r a (p x) theorem coe_smul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) : ⇑(r β€’ p) = r β€’ ⇑p := rfl #align seminorm.coe_smul Seminorm.coe_smul @[simp] theorem smul_apply [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) (x : E) : (r β€’ p) x = r β€’ p x := rfl #align seminorm.smul_apply Seminorm.smul_apply instance instAdd : Add (Seminorm π•œ E) where add p q := { p.toAddGroupSeminorm + q.toAddGroupSeminorm with toFun := fun x => p x + q x smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] } theorem coe_add (p q : Seminorm π•œ E) : ⇑(p + q) = p + q := rfl #align seminorm.coe_add Seminorm.coe_add @[simp] theorem add_apply (p q : Seminorm π•œ E) (x : E) : (p + q) x = p x + q x := rfl #align seminorm.add_apply Seminorm.add_apply instance instAddMonoid : AddMonoid (Seminorm π•œ E) := FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π•œ E) := FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl instance instMulAction [Monoid R] [MulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : MulAction R (Seminorm π•œ E) := FunLike.coe_injective.mulAction _ (by intros; rfl) variable (π•œ E) /-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π•œ E` is a module. -/ @[simps] def coeFnAddMonoidHom : AddMonoidHom (Seminorm π•œ E) (E β†’ ℝ) where toFun := (↑) map_zero' := coe_zero map_add' := coe_add #align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π•œ E) := show @Function.Injective (Seminorm π•œ E) (E β†’ ℝ) (↑) from FunLike.coe_injective #align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective variable {π•œ E} instance instDistribMulAction [Monoid R] [DistribMulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : DistribMulAction R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).distribMulAction _ (by intros; rfl) instance instModule [Semiring R] [Module R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : Module R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).module R _ (by intros; rfl) instance instSup : Sup (Seminorm π•œ E) where sup p q := { p.toAddGroupSeminorm βŠ” q.toAddGroupSeminorm with toFun := p βŠ” q smul' := fun x v => (congr_argβ‚‚ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <| (mul_max_of_nonneg _ _ <| norm_nonneg x).symm } @[simp] theorem coe_sup (p q : Seminorm π•œ E) : ⇑(p βŠ” q) = (p : E β†’ ℝ) βŠ” (q : E β†’ ℝ) := rfl #align seminorm.coe_sup Seminorm.coe_sup theorem sup_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ” q) x = p x βŠ” q x := rfl #align seminorm.sup_apply Seminorm.sup_apply theorem smul_sup [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ” q) = r β€’ p βŠ” r β€’ q := have real.smul_max : βˆ€ x y : ℝ, r β€’ max x y = max (r β€’ x) (r β€’ y) := fun x y => by simpa only [← smul_eq_mul, ← NNReal.smul_def, smul_one_smul ℝβ‰₯0 r (_ : ℝ)] using mul_max_of_nonneg x y (r β€’ (1 : ℝβ‰₯0) : ℝβ‰₯0).coe_nonneg ext fun x => real.smul_max _ _ #align seminorm.smul_sup Seminorm.smul_sup instance instPartialOrder : PartialOrder (Seminorm π•œ E) := PartialOrder.lift _ FunLike.coe_injective @[simp, norm_cast] theorem coe_le_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) ≀ q ↔ p ≀ q := Iff.rfl #align seminorm.coe_le_coe Seminorm.coe_le_coe @[simp, norm_cast] theorem coe_lt_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) < q ↔ p < q := Iff.rfl #align seminorm.coe_lt_coe Seminorm.coe_lt_coe theorem le_def {p q : Seminorm π•œ E} : p ≀ q ↔ βˆ€ x, p x ≀ q x := Iff.rfl #align seminorm.le_def Seminorm.le_def theorem lt_def {p q : Seminorm π•œ E} : p < q ↔ p ≀ q ∧ βˆƒ x, p x < q x := @Pi.lt_def _ _ _ p q #align seminorm.lt_def Seminorm.lt_def instance instSemilatticeSup : SemilatticeSup (Seminorm π•œ E) := Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup end SMul end AddGroup section Module variable [SeminormedRing π•œβ‚‚] [SeminormedRing π•œβ‚ƒ] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable {σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₂₃] variable {σ₁₃ : π•œ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₁₃] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [AddCommGroup E₃] variable [AddCommGroup F] [AddCommGroup G] variable [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] [Module π•œβ‚ƒ E₃] [Module π•œ F] [Module π•œ G] -- Porting note: even though this instance is found immediately by typeclass search, -- it seems to be needed below!? noncomputable instance smul_nnreal_real : SMul ℝβ‰₯0 ℝ := inferInstance variable [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] /-- Composition of a seminorm with a linear map is a seminorm. -/ def comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œ E := { p.toAddGroupSeminorm.comp f.toAddMonoidHom with toFun := fun x => p (f x) -- Porting note: the `simp only` below used to be part of the `rw`. -- I'm not sure why this change was needed, and am worried by it! smul' := fun _ _ => by simp only [map_smulβ‚›β‚—]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] } #align seminorm.comp Seminorm.comp theorem coe_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : ⇑(p.comp f) = p ∘ f := rfl #align seminorm.coe_comp Seminorm.coe_comp @[simp] theorem comp_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (x : E) : (p.comp f) x = p (f x) := rfl #align seminorm.comp_apply Seminorm.comp_apply @[simp] theorem comp_id (p : Seminorm π•œ E) : p.comp LinearMap.id = p := ext fun _ => rfl #align seminorm.comp_id Seminorm.comp_id @[simp] theorem comp_zero (p : Seminorm π•œβ‚‚ Eβ‚‚) : p.comp (0 : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) = 0 := ext fun _ => map_zero p #align seminorm.comp_zero Seminorm.comp_zero @[simp] theorem zero_comp (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (0 : Seminorm π•œβ‚‚ Eβ‚‚).comp f = 0 := ext fun _ => rfl #align seminorm.zero_comp Seminorm.zero_comp theorem comp_comp [RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] (p : Seminorm π•œβ‚ƒ E₃) (g : Eβ‚‚ β†’β‚›β‚—[σ₂₃] E₃) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (g.comp f) = (p.comp g).comp f := ext fun _ => rfl #align seminorm.comp_comp Seminorm.comp_comp theorem add_comp (p q : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (p + q).comp f = p.comp f + q.comp f := ext fun _ => rfl #align seminorm.add_comp Seminorm.add_comp theorem comp_add_le (p : Seminorm π•œβ‚‚ Eβ‚‚) (f g : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (f + g) ≀ p.comp f + p.comp g := fun _ => map_add_le_add p _ _ #align seminorm.comp_add_le Seminorm.comp_add_le theorem smul_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : R) : (c β€’ p).comp f = c β€’ p.comp f := ext fun _ => rfl #align seminorm.smul_comp Seminorm.smul_comp theorem comp_mono {p q : Seminorm π•œβ‚‚ Eβ‚‚} (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (hp : p ≀ q) : p.comp f ≀ q.comp f := fun _ => hp _ #align seminorm.comp_mono Seminorm.comp_mono /-- The composition as an `AddMonoidHom`. -/ @[simps] def pullback (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œβ‚‚ Eβ‚‚ β†’+ Seminorm π•œ E where toFun := fun p => p.comp f map_zero' := zero_comp f map_add' := fun p q => add_comp p q f #align seminorm.pullback Seminorm.pullback instance instOrderBot : OrderBot (Seminorm π•œ E) where bot := 0 bot_le := map_nonneg @[simp] theorem coe_bot : ⇑(βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_bot Seminorm.coe_bot theorem bot_eq_zero : (βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.bot_eq_zero Seminorm.bot_eq_zero theorem smul_le_smul {p q : Seminorm π•œ E} {a b : ℝβ‰₯0} (hpq : p ≀ q) (hab : a ≀ b) : a β€’ p ≀ b β€’ q := by simp_rw [le_def] intro x exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b) #align seminorm.smul_le_smul Seminorm.smul_le_smul theorem finset_sup_apply (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = ↑(s.sup fun i => ⟨p i x, map_nonneg (p i) x⟩ : ℝβ‰₯0) := by induction' s using Finset.cons_induction_on with a s ha ih Β· rw [Finset.sup_empty, Finset.sup_empty, coe_bot, _root_.bot_eq_zero, Pi.zero_apply] norm_cast Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max, NNReal.coe_max, NNReal.coe_mk, ih] #align seminorm.finset_sup_apply Seminorm.finset_sup_apply theorem exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) : βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.exists_mem_eq_sup s hs (fun i ↦ (⟨p i x, map_nonneg _ _⟩ : ℝβ‰₯0)) with ⟨i, hi, hix⟩ rw [finset_sup_apply] exact ⟨i, hi, congr_arg _ hix⟩ theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = 0 ∨ βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.eq_empty_or_nonempty s with (rfl|hs) Β· left; rfl Β· right; exact exists_apply_eq_finset_sup p hs x theorem finset_sup_smul (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (C : ℝβ‰₯0) : s.sup (C β€’ p) = C β€’ s.sup p := by ext x rw [smul_apply, finset_sup_apply, finset_sup_apply] symm exact congr_arg ((↑) : ℝβ‰₯0 β†’ ℝ) (NNReal.mul_finset_sup C s (fun i ↦ ⟨p i x, map_nonneg _ _⟩)) theorem finset_sup_le_sum (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) : s.sup p ≀ βˆ‘ i in s, p i := by classical refine' Finset.sup_le_iff.mpr _ intro i hi rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left] exact bot_le #align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum theorem finset_sup_apply_le {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 ≀ a) (h : βˆ€ i, i ∈ s β†’ p i x ≀ a) : s.sup p x ≀ a := by lift a to ℝβ‰₯0 using ha rw [finset_sup_apply, NNReal.coe_le_coe] exact Finset.sup_le h #align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le theorem le_finset_sup_apply {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {i : ΞΉ} (hi : i ∈ s) : p i x ≀ s.sup p x := (Finset.le_sup hi : p i ≀ s.sup p) x theorem finset_sup_apply_lt {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 < a) (h : βˆ€ i, i ∈ s β†’ p i x < a) : s.sup p x < a := by lift a to ℝβ‰₯0 using ha.le rw [finset_sup_apply, NNReal.coe_lt_coe, Finset.sup_lt_iff] Β· exact h Β· exact NNReal.coe_pos.mpr ha #align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt theorem norm_sub_map_le_sub (p : Seminorm π•œ E) (x y : E) : β€–p x - p yβ€– ≀ p (x - y) := abs_sub_map_le_sub p x y #align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub end Module end SeminormedRing section SeminormedCommRing variable [SeminormedRing π•œ] [SeminormedCommRing π•œβ‚‚] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] theorem comp_smul (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) : p.comp (c β€’ f) = β€–cβ€–β‚Š β€’ p.comp f := ext fun _ => by rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm, smul_eq_mul, comp_apply] #align seminorm.comp_smul Seminorm.comp_smul theorem comp_smul_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) (x : E) : p.comp (c β€’ f) x = β€–cβ€– * p (f x) := map_smul_eq_mul p _ _ #align seminorm.comp_smul_apply Seminorm.comp_smul_apply end SeminormedCommRing section NormedField variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] {p q : Seminorm π•œ E} {x : E} /-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/ theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) := ⟨0, by rintro _ ⟨x, rfl⟩ dsimp; positivity⟩ #align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add noncomputable instance instInf : Inf (Seminorm π•œ E) where inf p q := { p.toAddGroupSeminorm βŠ“ q.toAddGroupSeminorm with toFun := fun x => β¨… u : E, p u + q (x - u) smul' := by intro a x obtain rfl | ha := eq_or_ne a 0 Β· rw [norm_zero, zero_mul, zero_smul] refine' ciInf_eq_of_forall_ge_of_forall_gt_exists_lt -- Porting note: the following was previously `fun i => by positivity` (fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _)) fun x hx => ⟨0, by rwa [map_zero, sub_zero, map_zero, add_zero]⟩ simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, ← map_smul_eq_mul p, ← map_smul_eq_mul q, smul_sub] refine' Function.Surjective.iInf_congr ((a⁻¹ β€’ Β·) : E β†’ E) (fun u => ⟨a β€’ u, inv_smul_smulβ‚€ ha u⟩) fun u => _ rw [smul_inv_smulβ‚€ ha] } @[simp] theorem inf_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ“ q) x = β¨… u : E, p u + q (x - u) := rfl #align seminorm.inf_apply Seminorm.inf_apply noncomputable instance instLattice : Lattice (Seminorm π•œ E) := { Seminorm.instSemilatticeSup with inf := (Β· βŠ“ Β·) inf_le_left := fun p q x => ciInf_le_of_le bddBelow_range_add x <| by simp only [sub_self, map_zero, add_zero]; rfl inf_le_right := fun p q x => ciInf_le_of_le bddBelow_range_add 0 <| by simp only [sub_self, map_zero, zero_add, sub_zero]; rfl le_inf := fun a b c hab hac x => le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) } theorem smul_inf [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ“ q) = r β€’ p βŠ“ r β€’ q := by ext simp_rw [smul_apply, inf_apply, smul_apply, ← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add] #align seminorm.smul_inf Seminorm.smul_inf section Classical open Classical /-- We define the supremum of an arbitrary subset of `Seminorm π•œ E` as follows: * if `s` is `BddAbove` *as a set of functions `E β†’ ℝ`* (that is, if `s` is pointwise bounded above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a seminorm. * otherwise, we take the zero seminorm `βŠ₯`. There are two things worth mentioning here: * First, it is not trivial at first that `s` being bounded above *by a function* implies being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make the case disjunction on `BddAbove ((↑) '' s : Set (E β†’ ℝ))` and not `BddAbove s`. * Since the pointwise `Sup` already gives `0` at points where a family of functions is not bounded above, one could hope that just using the pointwise `Sup` would work here, without the need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can give a function which does *not* satisfy the seminorm axioms (typically sub-additivity). -/ noncomputable instance instSupSet : SupSet (Seminorm π•œ E) where sSup s := if h : BddAbove ((↑) '' s : Set (E β†’ ℝ)) then { toFun := ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) map_zero' := by rw [iSup_apply, ← @Real.ciSup_const_zero s] congr! rename_i _ _ _ i exact map_zero i.1 add_le' := fun x y => by rcases h with ⟨q, hq⟩ obtain rfl | h := s.eq_empty_or_nonempty Β· simp [Real.ciSup_empty] haveI : Nonempty ↑s := h.coe_sort simp only [iSup_apply] refine' ciSup_le fun i => ((i : Seminorm π•œ E).add_le' x y).trans <| add_le_add -- Porting note: `f` is provided to force `Subtype.val` to appear. -- A type ascription on `_` would have also worked, but would have been more verbose. (le_ciSup (f := fun i => (Subtype.val i : Seminorm π•œ E).toFun x) ⟨q x, _⟩ i) (le_ciSup (f := fun i => (Subtype.val i : Seminorm π•œ E).toFun y) ⟨q y, _⟩ i) <;> rw [mem_upperBounds, forall_range_iff] <;> exact fun j => hq (mem_image_of_mem _ j.2) _ neg' := fun x => by simp only [iSup_apply] congr! 2 rename_i _ _ _ i exact i.1.neg' _ smul' := fun a x => by simp only [iSup_apply] rw [← smul_eq_mul, Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π•œ E) x] congr! rename_i _ _ _ i exact i.1.smul' a x } else βŠ₯ protected theorem coe_sSup_eq' {s : Set <| Seminorm π•œ E} (hs : BddAbove ((↑) '' s : Set (E β†’ ℝ))) : ↑(sSup s) = ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) := congr_arg _ (dif_pos hs) #align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq' protected theorem bddAbove_iff {s : Set <| Seminorm π•œ E} : BddAbove s ↔ BddAbove ((↑) '' s : Set (E β†’ ℝ)) := ⟨fun ⟨q, hq⟩ => ⟨q, ball_image_of_ball fun p hp => hq hp⟩, fun H => ⟨sSup s, fun p hp x => by dsimp rw [Seminorm.coe_sSup_eq' H, iSup_apply] rcases H with ⟨q, hq⟩ exact le_ciSup ⟨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) x⟩ ⟨p, hp⟩⟩⟩ #align seminorm.bdd_above_iff Seminorm.bddAbove_iff protected theorem bddAbove_range_iff {p : ΞΉ β†’ Seminorm π•œ E} : BddAbove (range p) ↔ βˆ€ x, BddAbove (range fun i ↦ p i x) := by rw [Seminorm.bddAbove_iff, ← range_comp, bddAbove_range_pi]; rfl protected theorem coe_sSup_eq {s : Set <| Seminorm π•œ E} (hs : BddAbove s) : ↑(sSup s) = ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) := Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs) #align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β†’ Seminorm π•œ E} (hp : BddAbove (range p)) : ↑(⨆ i, p i) = ⨆ i, ((p i : Seminorm π•œ E) : E β†’ ℝ) := by rw [← sSup_range, Seminorm.coe_sSup_eq hp] exact iSup_range' (fun p : Seminorm π•œ E => (p : E β†’ ℝ)) p #align seminorm.coe_supr_eq Seminorm.coe_iSup_eq protected theorem sSup_apply {s : Set (Seminorm π•œ E)} (hp : BddAbove s) {x : E} : (sSup s) x = ⨆ p : s, (p : E β†’ ℝ) x := by rw [Seminorm.coe_sSup_eq hp, iSup_apply] protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β†’ Seminorm π•œ E} (hp : BddAbove (range p)) {x : E} : (⨆ i, p i) x = ⨆ i, p i x := by rw [Seminorm.coe_iSup_eq hp, iSup_apply] protected theorem sSup_empty : sSup (βˆ… : Set (Seminorm π•œ E)) = βŠ₯ := by ext rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty] rfl private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π•œ E)) (hs₁ : BddAbove s) (hsβ‚‚ : s.Nonempty) : IsLUB s (sSup s) := by refine' ⟨fun p hp x => _, fun p hp x => _⟩ <;> haveI : Nonempty ↑s := hsβ‚‚.coe_sort <;> dsimp <;> rw [Seminorm.coe_sSup_eq hs₁, iSup_apply] Β· rcases hs₁ with ⟨q, hq⟩ exact le_ciSup ⟨q x, forall_range_iff.mpr fun i : s => hq i.2 x⟩ ⟨p, hp⟩ Β· exact ciSup_le fun q => hp q.2 x /-- `Seminorm π•œ E` is a conditionally complete lattice. Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you need to use `sInf` on seminorms, then you should probably provide a more workable definition first, but this is unlikely to happen so we keep the "bad" definition for now. -/ noncomputable instance instConditionallyCompleteLattice : ConditionallyCompleteLattice (Seminorm π•œ E) := conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π•œ E) Seminorm.isLUB_sSup end Classical end NormedField /-! ### Seminorm ball -/ section SeminormedRing variable [SeminormedRing π•œ] section AddCommGroup variable [AddCommGroup E] section SMul variable [SMul π•œ E] (p : Seminorm π•œ E) /-- The ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y` with `p (y - x) < r`. -/ def ball (x : E) (r : ℝ) := { y : E | p (y - x) < r } #align seminorm.ball Seminorm.ball /-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y` with `p (y - x) ≀ r`. -/ def closedBall (x : E) (r : ℝ) := { y : E | p (y - x) ≀ r } #align seminorm.closed_ball Seminorm.closedBall variable {x y : E} {r : ℝ} @[simp] theorem mem_ball : y ∈ ball p x r ↔ p (y - x) < r := Iff.rfl #align seminorm.mem_ball Seminorm.mem_ball @[simp] theorem mem_closedBall : y ∈ closedBall p x r ↔ p (y - x) ≀ r := Iff.rfl #align seminorm.mem_closed_ball Seminorm.mem_closedBall theorem mem_ball_self (hr : 0 < r) : x ∈ ball p x r := by simp [hr] #align seminorm.mem_ball_self Seminorm.mem_ball_self theorem mem_closedBall_self (hr : 0 ≀ r) : x ∈ closedBall p x r := by simp [hr] #align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self theorem mem_ball_zero : y ∈ ball p 0 r ↔ p y < r := by rw [mem_ball, sub_zero] #align seminorm.mem_ball_zero Seminorm.mem_ball_zero theorem mem_closedBall_zero : y ∈ closedBall p 0 r ↔ p y ≀ r := by
rw [mem_closedBall, sub_zero]
theorem mem_closedBall_zero : y ∈ closedBall p 0 r ↔ p y ≀ r := by
Mathlib.Analysis.Seminorm.705_0.ywwMCgoKeIFKDZ3
theorem mem_closedBall_zero : y ∈ closedBall p 0 r ↔ p y ≀ r
Mathlib_Analysis_Seminorm
R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : SeminormedRing π•œ inst✝¹ : AddCommGroup E inst✝ : SMul π•œ E p : Seminorm π•œ E x✝ y : E r✝ : ℝ x : E r : ℝ ⊒ closedBall p x r = β‹‚ ρ, β‹‚ (_ : ρ > 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
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β‹‚ ρ > r, ball p x ρ := by
Mathlib.Analysis.Seminorm.720_0.ywwMCgoKeIFKDZ3
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β‹‚ ρ > r, ball p x ρ
Mathlib_Analysis_Seminorm
case h R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : SeminormedRing π•œ inst✝¹ : AddCommGroup E inst✝ : SMul π•œ E p : Seminorm π•œ E x✝ y✝ : E r✝ : ℝ x : E r : ℝ y : E ⊒ y ∈ closedBall p x r ↔ y ∈ β‹‚ ρ, β‹‚ (_ : ρ > 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']
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β‹‚ ρ > r, ball p x ρ := by ext y;
Mathlib.Analysis.Seminorm.720_0.ywwMCgoKeIFKDZ3
theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β‹‚ ρ > r, ball 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✝² : SeminormedRing π•œ inst✝¹ : AddCommGroup E inst✝ : SMul π•œ E p : Seminorm π•œ E x✝ y : E r : ℝ x : E hr : 0 < r ⊒ ball 0 x r = univ
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, YaΓ«l Dillies, Moritz Doll -/ import Mathlib.Data.Real.Pointwise import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.LocallyConvex.Basic import Mathlib.Analysis.Normed.Group.AddTorsor #align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c" /-! # Seminorms This file defines seminorms. A seminorm is a function to the reals which is positive-semidefinite, absolutely homogeneous, and subadditive. They are closely related to convex sets, and a topological vector space is locally convex if and only if its topology is induced by a family of seminorms. ## Main declarations For a module over a normed ring: * `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and subadditive. * `normSeminorm π•œ E`: The norm on `E` as a seminorm. ## References * [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966] ## Tags seminorm, locally convex, LCTVS -/ set_option autoImplicit true open NormedField Set Filter open scoped BigOperators NNReal Pointwise Topology Uniformity variable {R R' π•œ π•œβ‚‚ π•œβ‚ƒ 𝕝 E Eβ‚‚ E₃ F G ΞΉ : Type*} /-- A seminorm on a module over a normed ring is a function to the reals that is positive semidefinite, positive homogeneous, and subadditive. -/ structure Seminorm (π•œ : Type*) (E : Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminorm E where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ smul' : βˆ€ (a : π•œ) (x : E), toFun (a β€’ x) = β€–aβ€– * toFun x #align seminorm Seminorm attribute [nolint docBlame] Seminorm.toAddGroupSeminorm /-- `SeminormClass F π•œ E` states that `F` is a type of seminorms on the `π•œ`-module `E`. You should extend this class when you extend `Seminorm`. -/ class SeminormClass (F : Type*) (π•œ E : outParam <| Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminormClass F E ℝ where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ map_smul_eq_mul (f : F) (a : π•œ) (x : E) : f (a β€’ x) = β€–aβ€– * f x #align seminorm_class SeminormClass export SeminormClass (map_smul_eq_mul) -- Porting note: dangerous instances no longer exist -- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass section Of /-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a `SeminormedRing π•œ`. -/ def Seminorm.of [SeminormedRing π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (add_le : βˆ€ x y : E, f (x + y) ≀ f x + f y) (smul : βˆ€ (a : π•œ) (x : E), f (a β€’ x) = β€–aβ€– * f x) : Seminorm π•œ E where toFun := f map_zero' := by rw [← zero_smul π•œ (0 : E), smul, norm_zero, zero_mul] add_le' := add_le smul' := smul neg' x := by rw [← neg_one_smul π•œ, smul, norm_neg, ← smul, one_smul] #align seminorm.of Seminorm.of /-- Alternative constructor for a `Seminorm` over a normed field `π•œ` that only assumes `f 0 = 0` and an inequality for the scalar multiplication. -/ def Seminorm.ofSMulLE [NormedField π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (map_zero : f 0 = 0) (add_le : βˆ€ x y, f (x + y) ≀ f x + f y) (smul_le : βˆ€ (r : π•œ) (x), f (r β€’ x) ≀ β€–rβ€– * f x) : Seminorm π•œ E := Seminorm.of f add_le fun r x => by refine' le_antisymm (smul_le r x) _ by_cases h : r = 0 Β· simp [h, map_zero] rw [← mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))] rw [inv_mul_cancel_leftβ‚€ (norm_ne_zero_iff.mpr h)] specialize smul_le r⁻¹ (r β€’ x) rw [norm_inv] at smul_le convert smul_le simp [h] #align seminorm.of_smul_le Seminorm.ofSMulLE end Of namespace Seminorm section SeminormedRing variable [SeminormedRing π•œ] section AddGroup variable [AddGroup E] section SMul variable [SMul π•œ E] instance instSeminormClass : SeminormClass (Seminorm π•œ E) π•œ E where coe f := f.toFun coe_injective' f g h := by rcases f with ⟨⟨_⟩⟩ rcases g with ⟨⟨_⟩⟩ congr map_zero f := f.map_zero' map_add_le_add f := f.add_le' map_neg_eq_map f := f.neg' map_smul_eq_mul f := f.smul' #align seminorm.seminorm_class Seminorm.instSeminormClass /-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/ instance instCoeFun : CoeFun (Seminorm π•œ E) fun _ => E β†’ ℝ := FunLike.hasCoeToFun @[ext] theorem ext {p q : Seminorm π•œ E} (h : βˆ€ x, (p : E β†’ ℝ) x = q x) : p = q := FunLike.ext p q h #align seminorm.ext Seminorm.ext instance instZero : Zero (Seminorm π•œ E) := ⟨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with smul' := fun _ _ => (mul_zero _).symm }⟩ @[simp] theorem coe_zero : ⇑(0 : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_zero Seminorm.coe_zero @[simp] theorem zero_apply (x : E) : (0 : Seminorm π•œ E) x = 0 := rfl #align seminorm.zero_apply Seminorm.zero_apply instance : Inhabited (Seminorm π•œ E) := ⟨0⟩ variable (p : Seminorm π•œ E) (c : π•œ) (x y : E) (r : ℝ) /-- Any action on `ℝ` which factors through `ℝβ‰₯0` applies to a seminorm. -/ instance instSMul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : SMul R (Seminorm π•œ E) where smul r p := { r β€’ p.toAddGroupSeminorm with toFun := fun x => r β€’ p x smul' := fun _ _ => by simp only [← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul] rw [map_smul_eq_mul, mul_left_comm] } instance [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] [SMul R' ℝ] [SMul R' ℝβ‰₯0] [IsScalarTower R' ℝβ‰₯0 ℝ] [SMul R R'] [IsScalarTower R R' ℝ] : IsScalarTower R R' (Seminorm π•œ E) where smul_assoc r a p := ext fun x => smul_assoc r a (p x) theorem coe_smul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) : ⇑(r β€’ p) = r β€’ ⇑p := rfl #align seminorm.coe_smul Seminorm.coe_smul @[simp] theorem smul_apply [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) (x : E) : (r β€’ p) x = r β€’ p x := rfl #align seminorm.smul_apply Seminorm.smul_apply instance instAdd : Add (Seminorm π•œ E) where add p q := { p.toAddGroupSeminorm + q.toAddGroupSeminorm with toFun := fun x => p x + q x smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] } theorem coe_add (p q : Seminorm π•œ E) : ⇑(p + q) = p + q := rfl #align seminorm.coe_add Seminorm.coe_add @[simp] theorem add_apply (p q : Seminorm π•œ E) (x : E) : (p + q) x = p x + q x := rfl #align seminorm.add_apply Seminorm.add_apply instance instAddMonoid : AddMonoid (Seminorm π•œ E) := FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π•œ E) := FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl instance instMulAction [Monoid R] [MulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : MulAction R (Seminorm π•œ E) := FunLike.coe_injective.mulAction _ (by intros; rfl) variable (π•œ E) /-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π•œ E` is a module. -/ @[simps] def coeFnAddMonoidHom : AddMonoidHom (Seminorm π•œ E) (E β†’ ℝ) where toFun := (↑) map_zero' := coe_zero map_add' := coe_add #align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π•œ E) := show @Function.Injective (Seminorm π•œ E) (E β†’ ℝ) (↑) from FunLike.coe_injective #align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective variable {π•œ E} instance instDistribMulAction [Monoid R] [DistribMulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : DistribMulAction R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).distribMulAction _ (by intros; rfl) instance instModule [Semiring R] [Module R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : Module R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).module R _ (by intros; rfl) instance instSup : Sup (Seminorm π•œ E) where sup p q := { p.toAddGroupSeminorm βŠ” q.toAddGroupSeminorm with toFun := p βŠ” q smul' := fun x v => (congr_argβ‚‚ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <| (mul_max_of_nonneg _ _ <| norm_nonneg x).symm } @[simp] theorem coe_sup (p q : Seminorm π•œ E) : ⇑(p βŠ” q) = (p : E β†’ ℝ) βŠ” (q : E β†’ ℝ) := rfl #align seminorm.coe_sup Seminorm.coe_sup theorem sup_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ” q) x = p x βŠ” q x := rfl #align seminorm.sup_apply Seminorm.sup_apply theorem smul_sup [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ” q) = r β€’ p βŠ” r β€’ q := have real.smul_max : βˆ€ x y : ℝ, r β€’ max x y = max (r β€’ x) (r β€’ y) := fun x y => by simpa only [← smul_eq_mul, ← NNReal.smul_def, smul_one_smul ℝβ‰₯0 r (_ : ℝ)] using mul_max_of_nonneg x y (r β€’ (1 : ℝβ‰₯0) : ℝβ‰₯0).coe_nonneg ext fun x => real.smul_max _ _ #align seminorm.smul_sup Seminorm.smul_sup instance instPartialOrder : PartialOrder (Seminorm π•œ E) := PartialOrder.lift _ FunLike.coe_injective @[simp, norm_cast] theorem coe_le_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) ≀ q ↔ p ≀ q := Iff.rfl #align seminorm.coe_le_coe Seminorm.coe_le_coe @[simp, norm_cast] theorem coe_lt_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) < q ↔ p < q := Iff.rfl #align seminorm.coe_lt_coe Seminorm.coe_lt_coe theorem le_def {p q : Seminorm π•œ E} : p ≀ q ↔ βˆ€ x, p x ≀ q x := Iff.rfl #align seminorm.le_def Seminorm.le_def theorem lt_def {p q : Seminorm π•œ E} : p < q ↔ p ≀ q ∧ βˆƒ x, p x < q x := @Pi.lt_def _ _ _ p q #align seminorm.lt_def Seminorm.lt_def instance instSemilatticeSup : SemilatticeSup (Seminorm π•œ E) := Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup end SMul end AddGroup section Module variable [SeminormedRing π•œβ‚‚] [SeminormedRing π•œβ‚ƒ] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable {σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₂₃] variable {σ₁₃ : π•œ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₁₃] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [AddCommGroup E₃] variable [AddCommGroup F] [AddCommGroup G] variable [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] [Module π•œβ‚ƒ E₃] [Module π•œ F] [Module π•œ G] -- Porting note: even though this instance is found immediately by typeclass search, -- it seems to be needed below!? noncomputable instance smul_nnreal_real : SMul ℝβ‰₯0 ℝ := inferInstance variable [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] /-- Composition of a seminorm with a linear map is a seminorm. -/ def comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œ E := { p.toAddGroupSeminorm.comp f.toAddMonoidHom with toFun := fun x => p (f x) -- Porting note: the `simp only` below used to be part of the `rw`. -- I'm not sure why this change was needed, and am worried by it! smul' := fun _ _ => by simp only [map_smulβ‚›β‚—]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] } #align seminorm.comp Seminorm.comp theorem coe_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : ⇑(p.comp f) = p ∘ f := rfl #align seminorm.coe_comp Seminorm.coe_comp @[simp] theorem comp_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (x : E) : (p.comp f) x = p (f x) := rfl #align seminorm.comp_apply Seminorm.comp_apply @[simp] theorem comp_id (p : Seminorm π•œ E) : p.comp LinearMap.id = p := ext fun _ => rfl #align seminorm.comp_id Seminorm.comp_id @[simp] theorem comp_zero (p : Seminorm π•œβ‚‚ Eβ‚‚) : p.comp (0 : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) = 0 := ext fun _ => map_zero p #align seminorm.comp_zero Seminorm.comp_zero @[simp] theorem zero_comp (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (0 : Seminorm π•œβ‚‚ Eβ‚‚).comp f = 0 := ext fun _ => rfl #align seminorm.zero_comp Seminorm.zero_comp theorem comp_comp [RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] (p : Seminorm π•œβ‚ƒ E₃) (g : Eβ‚‚ β†’β‚›β‚—[σ₂₃] E₃) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (g.comp f) = (p.comp g).comp f := ext fun _ => rfl #align seminorm.comp_comp Seminorm.comp_comp theorem add_comp (p q : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (p + q).comp f = p.comp f + q.comp f := ext fun _ => rfl #align seminorm.add_comp Seminorm.add_comp theorem comp_add_le (p : Seminorm π•œβ‚‚ Eβ‚‚) (f g : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (f + g) ≀ p.comp f + p.comp g := fun _ => map_add_le_add p _ _ #align seminorm.comp_add_le Seminorm.comp_add_le theorem smul_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : R) : (c β€’ p).comp f = c β€’ p.comp f := ext fun _ => rfl #align seminorm.smul_comp Seminorm.smul_comp theorem comp_mono {p q : Seminorm π•œβ‚‚ Eβ‚‚} (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (hp : p ≀ q) : p.comp f ≀ q.comp f := fun _ => hp _ #align seminorm.comp_mono Seminorm.comp_mono /-- The composition as an `AddMonoidHom`. -/ @[simps] def pullback (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œβ‚‚ Eβ‚‚ β†’+ Seminorm π•œ E where toFun := fun p => p.comp f map_zero' := zero_comp f map_add' := fun p q => add_comp p q f #align seminorm.pullback Seminorm.pullback instance instOrderBot : OrderBot (Seminorm π•œ E) where bot := 0 bot_le := map_nonneg @[simp] theorem coe_bot : ⇑(βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_bot Seminorm.coe_bot theorem bot_eq_zero : (βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.bot_eq_zero Seminorm.bot_eq_zero theorem smul_le_smul {p q : Seminorm π•œ E} {a b : ℝβ‰₯0} (hpq : p ≀ q) (hab : a ≀ b) : a β€’ p ≀ b β€’ q := by simp_rw [le_def] intro x exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b) #align seminorm.smul_le_smul Seminorm.smul_le_smul theorem finset_sup_apply (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = ↑(s.sup fun i => ⟨p i x, map_nonneg (p i) x⟩ : ℝβ‰₯0) := by induction' s using Finset.cons_induction_on with a s ha ih Β· rw [Finset.sup_empty, Finset.sup_empty, coe_bot, _root_.bot_eq_zero, Pi.zero_apply] norm_cast Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max, NNReal.coe_max, NNReal.coe_mk, ih] #align seminorm.finset_sup_apply Seminorm.finset_sup_apply theorem exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) : βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.exists_mem_eq_sup s hs (fun i ↦ (⟨p i x, map_nonneg _ _⟩ : ℝβ‰₯0)) with ⟨i, hi, hix⟩ rw [finset_sup_apply] exact ⟨i, hi, congr_arg _ hix⟩ theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = 0 ∨ βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.eq_empty_or_nonempty s with (rfl|hs) Β· left; rfl Β· right; exact exists_apply_eq_finset_sup p hs x theorem finset_sup_smul (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (C : ℝβ‰₯0) : s.sup (C β€’ p) = C β€’ s.sup p := by ext x rw [smul_apply, finset_sup_apply, finset_sup_apply] symm exact congr_arg ((↑) : ℝβ‰₯0 β†’ ℝ) (NNReal.mul_finset_sup C s (fun i ↦ ⟨p i x, map_nonneg _ _⟩)) theorem finset_sup_le_sum (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) : s.sup p ≀ βˆ‘ i in s, p i := by classical refine' Finset.sup_le_iff.mpr _ intro i hi rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left] exact bot_le #align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum theorem finset_sup_apply_le {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 ≀ a) (h : βˆ€ i, i ∈ s β†’ p i x ≀ a) : s.sup p x ≀ a := by lift a to ℝβ‰₯0 using ha rw [finset_sup_apply, NNReal.coe_le_coe] exact Finset.sup_le h #align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le theorem le_finset_sup_apply {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {i : ΞΉ} (hi : i ∈ s) : p i x ≀ s.sup p x := (Finset.le_sup hi : p i ≀ s.sup p) x theorem finset_sup_apply_lt {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 < a) (h : βˆ€ i, i ∈ s β†’ p i x < a) : s.sup p x < a := by lift a to ℝβ‰₯0 using ha.le rw [finset_sup_apply, NNReal.coe_lt_coe, Finset.sup_lt_iff] Β· exact h Β· exact NNReal.coe_pos.mpr ha #align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt theorem norm_sub_map_le_sub (p : Seminorm π•œ E) (x y : E) : β€–p x - p yβ€– ≀ p (x - y) := abs_sub_map_le_sub p x y #align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub end Module end SeminormedRing section SeminormedCommRing variable [SeminormedRing π•œ] [SeminormedCommRing π•œβ‚‚] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] theorem comp_smul (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) : p.comp (c β€’ f) = β€–cβ€–β‚Š β€’ p.comp f := ext fun _ => by rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm, smul_eq_mul, comp_apply] #align seminorm.comp_smul Seminorm.comp_smul theorem comp_smul_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) (x : E) : p.comp (c β€’ f) x = β€–cβ€– * p (f x) := map_smul_eq_mul p _ _ #align seminorm.comp_smul_apply Seminorm.comp_smul_apply end SeminormedCommRing section NormedField variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] {p q : Seminorm π•œ E} {x : E} /-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/ theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) := ⟨0, by rintro _ ⟨x, rfl⟩ dsimp; positivity⟩ #align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add noncomputable instance instInf : Inf (Seminorm π•œ E) where inf p q := { p.toAddGroupSeminorm βŠ“ q.toAddGroupSeminorm with toFun := fun x => β¨… u : E, p u + q (x - u) smul' := by intro a x obtain rfl | ha := eq_or_ne a 0 Β· rw [norm_zero, zero_mul, zero_smul] refine' ciInf_eq_of_forall_ge_of_forall_gt_exists_lt -- Porting note: the following was previously `fun i => by positivity` (fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _)) fun x hx => ⟨0, by rwa [map_zero, sub_zero, map_zero, add_zero]⟩ simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, ← map_smul_eq_mul p, ← map_smul_eq_mul q, smul_sub] refine' Function.Surjective.iInf_congr ((a⁻¹ β€’ Β·) : E β†’ E) (fun u => ⟨a β€’ u, inv_smul_smulβ‚€ ha u⟩) fun u => _ rw [smul_inv_smulβ‚€ ha] } @[simp] theorem inf_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ“ q) x = β¨… u : E, p u + q (x - u) := rfl #align seminorm.inf_apply Seminorm.inf_apply noncomputable instance instLattice : Lattice (Seminorm π•œ E) := { Seminorm.instSemilatticeSup with inf := (Β· βŠ“ Β·) inf_le_left := fun p q x => ciInf_le_of_le bddBelow_range_add x <| by simp only [sub_self, map_zero, add_zero]; rfl inf_le_right := fun p q x => ciInf_le_of_le bddBelow_range_add 0 <| by simp only [sub_self, map_zero, zero_add, sub_zero]; rfl le_inf := fun a b c hab hac x => le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) } theorem smul_inf [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ“ q) = r β€’ p βŠ“ r β€’ q := by ext simp_rw [smul_apply, inf_apply, smul_apply, ← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add] #align seminorm.smul_inf Seminorm.smul_inf section Classical open Classical /-- We define the supremum of an arbitrary subset of `Seminorm π•œ E` as follows: * if `s` is `BddAbove` *as a set of functions `E β†’ ℝ`* (that is, if `s` is pointwise bounded above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a seminorm. * otherwise, we take the zero seminorm `βŠ₯`. There are two things worth mentioning here: * First, it is not trivial at first that `s` being bounded above *by a function* implies being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make the case disjunction on `BddAbove ((↑) '' s : Set (E β†’ ℝ))` and not `BddAbove s`. * Since the pointwise `Sup` already gives `0` at points where a family of functions is not bounded above, one could hope that just using the pointwise `Sup` would work here, without the need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can give a function which does *not* satisfy the seminorm axioms (typically sub-additivity). -/ noncomputable instance instSupSet : SupSet (Seminorm π•œ E) where sSup s := if h : BddAbove ((↑) '' s : Set (E β†’ ℝ)) then { toFun := ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) map_zero' := by rw [iSup_apply, ← @Real.ciSup_const_zero s] congr! rename_i _ _ _ i exact map_zero i.1 add_le' := fun x y => by rcases h with ⟨q, hq⟩ obtain rfl | h := s.eq_empty_or_nonempty Β· simp [Real.ciSup_empty] haveI : Nonempty ↑s := h.coe_sort simp only [iSup_apply] refine' ciSup_le fun i => ((i : Seminorm π•œ E).add_le' x y).trans <| add_le_add -- Porting note: `f` is provided to force `Subtype.val` to appear. -- A type ascription on `_` would have also worked, but would have been more verbose. (le_ciSup (f := fun i => (Subtype.val i : Seminorm π•œ E).toFun x) ⟨q x, _⟩ i) (le_ciSup (f := fun i => (Subtype.val i : Seminorm π•œ E).toFun y) ⟨q y, _⟩ i) <;> rw [mem_upperBounds, forall_range_iff] <;> exact fun j => hq (mem_image_of_mem _ j.2) _ neg' := fun x => by simp only [iSup_apply] congr! 2 rename_i _ _ _ i exact i.1.neg' _ smul' := fun a x => by simp only [iSup_apply] rw [← smul_eq_mul, Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π•œ E) x] congr! rename_i _ _ _ i exact i.1.smul' a x } else βŠ₯ protected theorem coe_sSup_eq' {s : Set <| Seminorm π•œ E} (hs : BddAbove ((↑) '' s : Set (E β†’ ℝ))) : ↑(sSup s) = ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) := congr_arg _ (dif_pos hs) #align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq' protected theorem bddAbove_iff {s : Set <| Seminorm π•œ E} : BddAbove s ↔ BddAbove ((↑) '' s : Set (E β†’ ℝ)) := ⟨fun ⟨q, hq⟩ => ⟨q, ball_image_of_ball fun p hp => hq hp⟩, fun H => ⟨sSup s, fun p hp x => by dsimp rw [Seminorm.coe_sSup_eq' H, iSup_apply] rcases H with ⟨q, hq⟩ exact le_ciSup ⟨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) x⟩ ⟨p, hp⟩⟩⟩ #align seminorm.bdd_above_iff Seminorm.bddAbove_iff protected theorem bddAbove_range_iff {p : ΞΉ β†’ Seminorm π•œ E} : BddAbove (range p) ↔ βˆ€ x, BddAbove (range fun i ↦ p i x) := by rw [Seminorm.bddAbove_iff, ← range_comp, bddAbove_range_pi]; rfl protected theorem coe_sSup_eq {s : Set <| Seminorm π•œ E} (hs : BddAbove s) : ↑(sSup s) = ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) := Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs) #align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β†’ Seminorm π•œ E} (hp : BddAbove (range p)) : ↑(⨆ i, p i) = ⨆ i, ((p i : Seminorm π•œ E) : E β†’ ℝ) := by rw [← sSup_range, Seminorm.coe_sSup_eq hp] exact iSup_range' (fun p : Seminorm π•œ E => (p : E β†’ ℝ)) p #align seminorm.coe_supr_eq Seminorm.coe_iSup_eq protected theorem sSup_apply {s : Set (Seminorm π•œ E)} (hp : BddAbove s) {x : E} : (sSup s) x = ⨆ p : s, (p : E β†’ ℝ) x := by rw [Seminorm.coe_sSup_eq hp, iSup_apply] protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β†’ Seminorm π•œ E} (hp : BddAbove (range p)) {x : E} : (⨆ i, p i) x = ⨆ i, p i x := by rw [Seminorm.coe_iSup_eq hp, iSup_apply] protected theorem sSup_empty : sSup (βˆ… : Set (Seminorm π•œ E)) = βŠ₯ := by ext rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty] rfl private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π•œ E)) (hs₁ : BddAbove s) (hsβ‚‚ : s.Nonempty) : IsLUB s (sSup s) := by refine' ⟨fun p hp x => _, fun p hp x => _⟩ <;> haveI : Nonempty ↑s := hsβ‚‚.coe_sort <;> dsimp <;> rw [Seminorm.coe_sSup_eq hs₁, iSup_apply] Β· rcases hs₁ with ⟨q, hq⟩ exact le_ciSup ⟨q x, forall_range_iff.mpr fun i : s => hq i.2 x⟩ ⟨p, hp⟩ Β· exact ciSup_le fun q => hp q.2 x /-- `Seminorm π•œ E` is a conditionally complete lattice. Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you need to use `sInf` on seminorms, then you should probably provide a more workable definition first, but this is unlikely to happen so we keep the "bad" definition for now. -/ noncomputable instance instConditionallyCompleteLattice : ConditionallyCompleteLattice (Seminorm π•œ E) := conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π•œ E) Seminorm.isLUB_sSup end Classical end NormedField /-! ### Seminorm ball -/ section SeminormedRing variable [SeminormedRing π•œ] section AddCommGroup variable [AddCommGroup E] section SMul variable [SMul π•œ E] (p : Seminorm π•œ E) /-- The ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y` with `p (y - x) < r`. -/ def ball (x : E) (r : ℝ) := { y : E | p (y - x) < r } #align seminorm.ball Seminorm.ball /-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y` with `p (y - x) ≀ r`. -/ def closedBall (x : E) (r : ℝ) := { y : E | p (y - x) ≀ r } #align seminorm.closed_ball Seminorm.closedBall variable {x y : E} {r : ℝ} @[simp] theorem mem_ball : y ∈ ball p x r ↔ p (y - x) < r := Iff.rfl #align seminorm.mem_ball Seminorm.mem_ball @[simp] theorem mem_closedBall : y ∈ closedBall p x r ↔ p (y - x) ≀ r := Iff.rfl #align seminorm.mem_closed_ball Seminorm.mem_closedBall theorem mem_ball_self (hr : 0 < r) : x ∈ ball p x r := by simp [hr] #align seminorm.mem_ball_self Seminorm.mem_ball_self theorem mem_closedBall_self (hr : 0 ≀ r) : x ∈ closedBall p x r := by simp [hr] #align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self theorem mem_ball_zero : y ∈ ball p 0 r ↔ p y < r := by rw [mem_ball, sub_zero] #align seminorm.mem_ball_zero Seminorm.mem_ball_zero theorem mem_closedBall_zero : y ∈ closedBall p 0 r ↔ p y ≀ r := by rw [mem_closedBall, sub_zero] #align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } := Set.ext fun _ => p.mem_ball_zero #align seminorm.ball_zero_eq Seminorm.ball_zero_eq theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y ≀ r } := Set.ext fun _ => p.mem_closedBall_zero #align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq theorem ball_subset_closedBall (x r) : ball p x r βŠ† closedBall p x r := fun _ h => (mem_closedBall _).mpr ((mem_ball _).mp h).le #align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β‹‚ ρ > r, ball p x ρ := by ext y; simp_rw [mem_closedBall, mem_iInterβ‚‚, mem_ball, ← forall_lt_iff_le'] #align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball @[simp] theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π•œ E) x r = Set.univ := by
rw [Set.eq_univ_iff_forall, ball]
@[simp] theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π•œ E) x r = Set.univ := by
Mathlib.Analysis.Seminorm.724_0.ywwMCgoKeIFKDZ3
@[simp] theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π•œ E) x r = Set.univ
Mathlib_Analysis_Seminorm
R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : SeminormedRing π•œ inst✝¹ : AddCommGroup E inst✝ : SMul π•œ E p : Seminorm π•œ E x✝ y : E r : ℝ x : E hr : 0 < r ⊒ βˆ€ (x_1 : E), x_1 ∈ {y | 0 (y - 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]
@[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]
Mathlib.Analysis.Seminorm.724_0.ywwMCgoKeIFKDZ3
@[simp] theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π•œ E) x r = Set.univ
Mathlib_Analysis_Seminorm
R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : SeminormedRing π•œ inst✝¹ : AddCommGroup E inst✝ : SMul π•œ E p✝ : Seminorm π•œ E x✝ y : E r✝ : ℝ p : Seminorm π•œ E c : ℝβ‰₯0 hc : 0 < c r : ℝ x : E ⊒ ball (c β€’ p) x r = ball p x (r / ↑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
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
Mathlib.Analysis.Seminorm.735_0.ywwMCgoKeIFKDZ3
theorem ball_smul (p : Seminorm π•œ E) {c : NNReal} (hc : 0 < c) (r : ℝ) (x : E) : (c β€’ p).ball x r = p.ball x (r / c)
Mathlib_Analysis_Seminorm
case h R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : SeminormedRing π•œ inst✝¹ : AddCommGroup E inst✝ : SMul π•œ E p✝ : Seminorm π•œ E x✝¹ y : E r✝ : ℝ p : Seminorm π•œ E c : ℝβ‰₯0 hc : 0 < c r : ℝ x x✝ : E ⊒ x✝ ∈ ball (c β€’ p) x r ↔ x✝ ∈ ball p x (r / ↑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)]
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
Mathlib.Analysis.Seminorm.735_0.ywwMCgoKeIFKDZ3
theorem ball_smul (p : Seminorm π•œ E) {c : NNReal} (hc : 0 < c) (r : ℝ) (x : E) : (c β€’ p).ball x r = p.ball x (r / c)
Mathlib_Analysis_Seminorm
R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : SeminormedRing π•œ inst✝¹ : AddCommGroup E inst✝ : SMul π•œ E p✝ : Seminorm π•œ E x✝ y : E r✝ : ℝ p : Seminorm π•œ E c : ℝβ‰₯0 hc : 0 < c r : ℝ x : E ⊒ closedBall (c β€’ p) x r = closedBall p x (r / ↑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
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
Mathlib.Analysis.Seminorm.742_0.ywwMCgoKeIFKDZ3
theorem closedBall_smul (p : Seminorm π•œ E) {c : NNReal} (hc : 0 < c) (r : ℝ) (x : E) : (c β€’ p).closedBall x r = p.closedBall x (r / c)
Mathlib_Analysis_Seminorm
case h R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : SeminormedRing π•œ inst✝¹ : AddCommGroup E inst✝ : SMul π•œ E p✝ : Seminorm π•œ E x✝¹ y : E r✝ : ℝ p : Seminorm π•œ E c : ℝβ‰₯0 hc : 0 < c r : ℝ x x✝ : E ⊒ x✝ ∈ closedBall (c β€’ p) x r ↔ x✝ ∈ closedBall p x (r / ↑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)]
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
Mathlib.Analysis.Seminorm.742_0.ywwMCgoKeIFKDZ3
theorem closedBall_smul (p : Seminorm π•œ E) {c : NNReal} (hc : 0 < c) (r : ℝ) (x : E) : (c β€’ p).closedBall x r = p.closedBall x (r / c)
Mathlib_Analysis_Seminorm
R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : SeminormedRing π•œ inst✝¹ : AddCommGroup E inst✝ : SMul π•œ E p✝ : Seminorm π•œ E x y : E r✝ : ℝ p q : Seminorm π•œ E e : E r : ℝ ⊒ ball (p βŠ” q) e r = ball p e r ∩ ball q e r
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, YaΓ«l Dillies, Moritz Doll -/ import Mathlib.Data.Real.Pointwise import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.LocallyConvex.Basic import Mathlib.Analysis.Normed.Group.AddTorsor #align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c" /-! # Seminorms This file defines seminorms. A seminorm is a function to the reals which is positive-semidefinite, absolutely homogeneous, and subadditive. They are closely related to convex sets, and a topological vector space is locally convex if and only if its topology is induced by a family of seminorms. ## Main declarations For a module over a normed ring: * `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and subadditive. * `normSeminorm π•œ E`: The norm on `E` as a seminorm. ## References * [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966] ## Tags seminorm, locally convex, LCTVS -/ set_option autoImplicit true open NormedField Set Filter open scoped BigOperators NNReal Pointwise Topology Uniformity variable {R R' π•œ π•œβ‚‚ π•œβ‚ƒ 𝕝 E Eβ‚‚ E₃ F G ΞΉ : Type*} /-- A seminorm on a module over a normed ring is a function to the reals that is positive semidefinite, positive homogeneous, and subadditive. -/ structure Seminorm (π•œ : Type*) (E : Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminorm E where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ smul' : βˆ€ (a : π•œ) (x : E), toFun (a β€’ x) = β€–aβ€– * toFun x #align seminorm Seminorm attribute [nolint docBlame] Seminorm.toAddGroupSeminorm /-- `SeminormClass F π•œ E` states that `F` is a type of seminorms on the `π•œ`-module `E`. You should extend this class when you extend `Seminorm`. -/ class SeminormClass (F : Type*) (π•œ E : outParam <| Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminormClass F E ℝ where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ map_smul_eq_mul (f : F) (a : π•œ) (x : E) : f (a β€’ x) = β€–aβ€– * f x #align seminorm_class SeminormClass export SeminormClass (map_smul_eq_mul) -- Porting note: dangerous instances no longer exist -- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass section Of /-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a `SeminormedRing π•œ`. -/ def Seminorm.of [SeminormedRing π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (add_le : βˆ€ x y : E, f (x + y) ≀ f x + f y) (smul : βˆ€ (a : π•œ) (x : E), f (a β€’ x) = β€–aβ€– * f x) : Seminorm π•œ E where toFun := f map_zero' := by rw [← zero_smul π•œ (0 : E), smul, norm_zero, zero_mul] add_le' := add_le smul' := smul neg' x := by rw [← neg_one_smul π•œ, smul, norm_neg, ← smul, one_smul] #align seminorm.of Seminorm.of /-- Alternative constructor for a `Seminorm` over a normed field `π•œ` that only assumes `f 0 = 0` and an inequality for the scalar multiplication. -/ def Seminorm.ofSMulLE [NormedField π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (map_zero : f 0 = 0) (add_le : βˆ€ x y, f (x + y) ≀ f x + f y) (smul_le : βˆ€ (r : π•œ) (x), f (r β€’ x) ≀ β€–rβ€– * f x) : Seminorm π•œ E := Seminorm.of f add_le fun r x => by refine' le_antisymm (smul_le r x) _ by_cases h : r = 0 Β· simp [h, map_zero] rw [← mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))] rw [inv_mul_cancel_leftβ‚€ (norm_ne_zero_iff.mpr h)] specialize smul_le r⁻¹ (r β€’ x) rw [norm_inv] at smul_le convert smul_le simp [h] #align seminorm.of_smul_le Seminorm.ofSMulLE end Of namespace Seminorm section SeminormedRing variable [SeminormedRing π•œ] section AddGroup variable [AddGroup E] section SMul variable [SMul π•œ E] instance instSeminormClass : SeminormClass (Seminorm π•œ E) π•œ E where coe f := f.toFun coe_injective' f g h := by rcases f with ⟨⟨_⟩⟩ rcases g with ⟨⟨_⟩⟩ congr map_zero f := f.map_zero' map_add_le_add f := f.add_le' map_neg_eq_map f := f.neg' map_smul_eq_mul f := f.smul' #align seminorm.seminorm_class Seminorm.instSeminormClass /-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/ instance instCoeFun : CoeFun (Seminorm π•œ E) fun _ => E β†’ ℝ := FunLike.hasCoeToFun @[ext] theorem ext {p q : Seminorm π•œ E} (h : βˆ€ x, (p : E β†’ ℝ) x = q x) : p = q := FunLike.ext p q h #align seminorm.ext Seminorm.ext instance instZero : Zero (Seminorm π•œ E) := ⟨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with smul' := fun _ _ => (mul_zero _).symm }⟩ @[simp] theorem coe_zero : ⇑(0 : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_zero Seminorm.coe_zero @[simp] theorem zero_apply (x : E) : (0 : Seminorm π•œ E) x = 0 := rfl #align seminorm.zero_apply Seminorm.zero_apply instance : Inhabited (Seminorm π•œ E) := ⟨0⟩ variable (p : Seminorm π•œ E) (c : π•œ) (x y : E) (r : ℝ) /-- Any action on `ℝ` which factors through `ℝβ‰₯0` applies to a seminorm. -/ instance instSMul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : SMul R (Seminorm π•œ E) where smul r p := { r β€’ p.toAddGroupSeminorm with toFun := fun x => r β€’ p x smul' := fun _ _ => by simp only [← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul] rw [map_smul_eq_mul, mul_left_comm] } instance [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] [SMul R' ℝ] [SMul R' ℝβ‰₯0] [IsScalarTower R' ℝβ‰₯0 ℝ] [SMul R R'] [IsScalarTower R R' ℝ] : IsScalarTower R R' (Seminorm π•œ E) where smul_assoc r a p := ext fun x => smul_assoc r a (p x) theorem coe_smul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) : ⇑(r β€’ p) = r β€’ ⇑p := rfl #align seminorm.coe_smul Seminorm.coe_smul @[simp] theorem smul_apply [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) (x : E) : (r β€’ p) x = r β€’ p x := rfl #align seminorm.smul_apply Seminorm.smul_apply instance instAdd : Add (Seminorm π•œ E) where add p q := { p.toAddGroupSeminorm + q.toAddGroupSeminorm with toFun := fun x => p x + q x smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] } theorem coe_add (p q : Seminorm π•œ E) : ⇑(p + q) = p + q := rfl #align seminorm.coe_add Seminorm.coe_add @[simp] theorem add_apply (p q : Seminorm π•œ E) (x : E) : (p + q) x = p x + q x := rfl #align seminorm.add_apply Seminorm.add_apply instance instAddMonoid : AddMonoid (Seminorm π•œ E) := FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π•œ E) := FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl instance instMulAction [Monoid R] [MulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : MulAction R (Seminorm π•œ E) := FunLike.coe_injective.mulAction _ (by intros; rfl) variable (π•œ E) /-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π•œ E` is a module. -/ @[simps] def coeFnAddMonoidHom : AddMonoidHom (Seminorm π•œ E) (E β†’ ℝ) where toFun := (↑) map_zero' := coe_zero map_add' := coe_add #align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π•œ E) := show @Function.Injective (Seminorm π•œ E) (E β†’ ℝ) (↑) from FunLike.coe_injective #align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective variable {π•œ E} instance instDistribMulAction [Monoid R] [DistribMulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : DistribMulAction R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).distribMulAction _ (by intros; rfl) instance instModule [Semiring R] [Module R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : Module R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).module R _ (by intros; rfl) instance instSup : Sup (Seminorm π•œ E) where sup p q := { p.toAddGroupSeminorm βŠ” q.toAddGroupSeminorm with toFun := p βŠ” q smul' := fun x v => (congr_argβ‚‚ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <| (mul_max_of_nonneg _ _ <| norm_nonneg x).symm } @[simp] theorem coe_sup (p q : Seminorm π•œ E) : ⇑(p βŠ” q) = (p : E β†’ ℝ) βŠ” (q : E β†’ ℝ) := rfl #align seminorm.coe_sup Seminorm.coe_sup theorem sup_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ” q) x = p x βŠ” q x := rfl #align seminorm.sup_apply Seminorm.sup_apply theorem smul_sup [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ” q) = r β€’ p βŠ” r β€’ q := have real.smul_max : βˆ€ x y : ℝ, r β€’ max x y = max (r β€’ x) (r β€’ y) := fun x y => by simpa only [← smul_eq_mul, ← NNReal.smul_def, smul_one_smul ℝβ‰₯0 r (_ : ℝ)] using mul_max_of_nonneg x y (r β€’ (1 : ℝβ‰₯0) : ℝβ‰₯0).coe_nonneg ext fun x => real.smul_max _ _ #align seminorm.smul_sup Seminorm.smul_sup instance instPartialOrder : PartialOrder (Seminorm π•œ E) := PartialOrder.lift _ FunLike.coe_injective @[simp, norm_cast] theorem coe_le_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) ≀ q ↔ p ≀ q := Iff.rfl #align seminorm.coe_le_coe Seminorm.coe_le_coe @[simp, norm_cast] theorem coe_lt_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) < q ↔ p < q := Iff.rfl #align seminorm.coe_lt_coe Seminorm.coe_lt_coe theorem le_def {p q : Seminorm π•œ E} : p ≀ q ↔ βˆ€ x, p x ≀ q x := Iff.rfl #align seminorm.le_def Seminorm.le_def theorem lt_def {p q : Seminorm π•œ E} : p < q ↔ p ≀ q ∧ βˆƒ x, p x < q x := @Pi.lt_def _ _ _ p q #align seminorm.lt_def Seminorm.lt_def instance instSemilatticeSup : SemilatticeSup (Seminorm π•œ E) := Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup end SMul end AddGroup section Module variable [SeminormedRing π•œβ‚‚] [SeminormedRing π•œβ‚ƒ] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable {σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₂₃] variable {σ₁₃ : π•œ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₁₃] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [AddCommGroup E₃] variable [AddCommGroup F] [AddCommGroup G] variable [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] [Module π•œβ‚ƒ E₃] [Module π•œ F] [Module π•œ G] -- Porting note: even though this instance is found immediately by typeclass search, -- it seems to be needed below!? noncomputable instance smul_nnreal_real : SMul ℝβ‰₯0 ℝ := inferInstance variable [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] /-- Composition of a seminorm with a linear map is a seminorm. -/ def comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œ E := { p.toAddGroupSeminorm.comp f.toAddMonoidHom with toFun := fun x => p (f x) -- Porting note: the `simp only` below used to be part of the `rw`. -- I'm not sure why this change was needed, and am worried by it! smul' := fun _ _ => by simp only [map_smulβ‚›β‚—]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] } #align seminorm.comp Seminorm.comp theorem coe_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : ⇑(p.comp f) = p ∘ f := rfl #align seminorm.coe_comp Seminorm.coe_comp @[simp] theorem comp_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (x : E) : (p.comp f) x = p (f x) := rfl #align seminorm.comp_apply Seminorm.comp_apply @[simp] theorem comp_id (p : Seminorm π•œ E) : p.comp LinearMap.id = p := ext fun _ => rfl #align seminorm.comp_id Seminorm.comp_id @[simp] theorem comp_zero (p : Seminorm π•œβ‚‚ Eβ‚‚) : p.comp (0 : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) = 0 := ext fun _ => map_zero p #align seminorm.comp_zero Seminorm.comp_zero @[simp] theorem zero_comp (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (0 : Seminorm π•œβ‚‚ Eβ‚‚).comp f = 0 := ext fun _ => rfl #align seminorm.zero_comp Seminorm.zero_comp theorem comp_comp [RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] (p : Seminorm π•œβ‚ƒ E₃) (g : Eβ‚‚ β†’β‚›β‚—[σ₂₃] E₃) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (g.comp f) = (p.comp g).comp f := ext fun _ => rfl #align seminorm.comp_comp Seminorm.comp_comp theorem add_comp (p q : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (p + q).comp f = p.comp f + q.comp f := ext fun _ => rfl #align seminorm.add_comp Seminorm.add_comp theorem comp_add_le (p : Seminorm π•œβ‚‚ Eβ‚‚) (f g : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (f + g) ≀ p.comp f + p.comp g := fun _ => map_add_le_add p _ _ #align seminorm.comp_add_le Seminorm.comp_add_le theorem smul_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : R) : (c β€’ p).comp f = c β€’ p.comp f := ext fun _ => rfl #align seminorm.smul_comp Seminorm.smul_comp theorem comp_mono {p q : Seminorm π•œβ‚‚ Eβ‚‚} (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (hp : p ≀ q) : p.comp f ≀ q.comp f := fun _ => hp _ #align seminorm.comp_mono Seminorm.comp_mono /-- The composition as an `AddMonoidHom`. -/ @[simps] def pullback (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œβ‚‚ Eβ‚‚ β†’+ Seminorm π•œ E where toFun := fun p => p.comp f map_zero' := zero_comp f map_add' := fun p q => add_comp p q f #align seminorm.pullback Seminorm.pullback instance instOrderBot : OrderBot (Seminorm π•œ E) where bot := 0 bot_le := map_nonneg @[simp] theorem coe_bot : ⇑(βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_bot Seminorm.coe_bot theorem bot_eq_zero : (βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.bot_eq_zero Seminorm.bot_eq_zero theorem smul_le_smul {p q : Seminorm π•œ E} {a b : ℝβ‰₯0} (hpq : p ≀ q) (hab : a ≀ b) : a β€’ p ≀ b β€’ q := by simp_rw [le_def] intro x exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b) #align seminorm.smul_le_smul Seminorm.smul_le_smul theorem finset_sup_apply (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = ↑(s.sup fun i => ⟨p i x, map_nonneg (p i) x⟩ : ℝβ‰₯0) := by induction' s using Finset.cons_induction_on with a s ha ih Β· rw [Finset.sup_empty, Finset.sup_empty, coe_bot, _root_.bot_eq_zero, Pi.zero_apply] norm_cast Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max, NNReal.coe_max, NNReal.coe_mk, ih] #align seminorm.finset_sup_apply Seminorm.finset_sup_apply theorem exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) : βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.exists_mem_eq_sup s hs (fun i ↦ (⟨p i x, map_nonneg _ _⟩ : ℝβ‰₯0)) with ⟨i, hi, hix⟩ rw [finset_sup_apply] exact ⟨i, hi, congr_arg _ hix⟩ theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = 0 ∨ βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.eq_empty_or_nonempty s with (rfl|hs) Β· left; rfl Β· right; exact exists_apply_eq_finset_sup p hs x theorem finset_sup_smul (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (C : ℝβ‰₯0) : s.sup (C β€’ p) = C β€’ s.sup p := by ext x rw [smul_apply, finset_sup_apply, finset_sup_apply] symm exact congr_arg ((↑) : ℝβ‰₯0 β†’ ℝ) (NNReal.mul_finset_sup C s (fun i ↦ ⟨p i x, map_nonneg _ _⟩)) theorem finset_sup_le_sum (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) : s.sup p ≀ βˆ‘ i in s, p i := by classical refine' Finset.sup_le_iff.mpr _ intro i hi rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left] exact bot_le #align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum theorem finset_sup_apply_le {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 ≀ a) (h : βˆ€ i, i ∈ s β†’ p i x ≀ a) : s.sup p x ≀ a := by lift a to ℝβ‰₯0 using ha rw [finset_sup_apply, NNReal.coe_le_coe] exact Finset.sup_le h #align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le theorem le_finset_sup_apply {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {i : ΞΉ} (hi : i ∈ s) : p i x ≀ s.sup p x := (Finset.le_sup hi : p i ≀ s.sup p) x theorem finset_sup_apply_lt {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 < a) (h : βˆ€ i, i ∈ s β†’ p i x < a) : s.sup p x < a := by lift a to ℝβ‰₯0 using ha.le rw [finset_sup_apply, NNReal.coe_lt_coe, Finset.sup_lt_iff] Β· exact h Β· exact NNReal.coe_pos.mpr ha #align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt theorem norm_sub_map_le_sub (p : Seminorm π•œ E) (x y : E) : β€–p x - p yβ€– ≀ p (x - y) := abs_sub_map_le_sub p x y #align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub end Module end SeminormedRing section SeminormedCommRing variable [SeminormedRing π•œ] [SeminormedCommRing π•œβ‚‚] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] theorem comp_smul (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) : p.comp (c β€’ f) = β€–cβ€–β‚Š β€’ p.comp f := ext fun _ => by rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm, smul_eq_mul, comp_apply] #align seminorm.comp_smul Seminorm.comp_smul theorem comp_smul_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) (x : E) : p.comp (c β€’ f) x = β€–cβ€– * p (f x) := map_smul_eq_mul p _ _ #align seminorm.comp_smul_apply Seminorm.comp_smul_apply end SeminormedCommRing section NormedField variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] {p q : Seminorm π•œ E} {x : E} /-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/ theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) := ⟨0, by rintro _ ⟨x, rfl⟩ dsimp; positivity⟩ #align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add noncomputable instance instInf : Inf (Seminorm π•œ E) where inf p q := { p.toAddGroupSeminorm βŠ“ q.toAddGroupSeminorm with toFun := fun x => β¨… u : E, p u + q (x - u) smul' := by intro a x obtain rfl | ha := eq_or_ne a 0 Β· rw [norm_zero, zero_mul, zero_smul] refine' ciInf_eq_of_forall_ge_of_forall_gt_exists_lt -- Porting note: the following was previously `fun i => by positivity` (fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _)) fun x hx => ⟨0, by rwa [map_zero, sub_zero, map_zero, add_zero]⟩ simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, ← map_smul_eq_mul p, ← map_smul_eq_mul q, smul_sub] refine' Function.Surjective.iInf_congr ((a⁻¹ β€’ Β·) : E β†’ E) (fun u => ⟨a β€’ u, inv_smul_smulβ‚€ ha u⟩) fun u => _ rw [smul_inv_smulβ‚€ ha] } @[simp] theorem inf_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ“ q) x = β¨… u : E, p u + q (x - u) := rfl #align seminorm.inf_apply Seminorm.inf_apply noncomputable instance instLattice : Lattice (Seminorm π•œ E) := { Seminorm.instSemilatticeSup with inf := (Β· βŠ“ Β·) inf_le_left := fun p q x => ciInf_le_of_le bddBelow_range_add x <| by simp only [sub_self, map_zero, add_zero]; rfl inf_le_right := fun p q x => ciInf_le_of_le bddBelow_range_add 0 <| by simp only [sub_self, map_zero, zero_add, sub_zero]; rfl le_inf := fun a b c hab hac x => le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) } theorem smul_inf [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ“ q) = r β€’ p βŠ“ r β€’ q := by ext simp_rw [smul_apply, inf_apply, smul_apply, ← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add] #align seminorm.smul_inf Seminorm.smul_inf section Classical open Classical /-- We define the supremum of an arbitrary subset of `Seminorm π•œ E` as follows: * if `s` is `BddAbove` *as a set of functions `E β†’ ℝ`* (that is, if `s` is pointwise bounded above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a seminorm. * otherwise, we take the zero seminorm `βŠ₯`. There are two things worth mentioning here: * First, it is not trivial at first that `s` being bounded above *by a function* implies being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make the case disjunction on `BddAbove ((↑) '' s : Set (E β†’ ℝ))` and not `BddAbove s`. * Since the pointwise `Sup` already gives `0` at points where a family of functions is not bounded above, one could hope that just using the pointwise `Sup` would work here, without the need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can give a function which does *not* satisfy the seminorm axioms (typically sub-additivity). -/ noncomputable instance instSupSet : SupSet (Seminorm π•œ E) where sSup s := if h : BddAbove ((↑) '' s : Set (E β†’ ℝ)) then { toFun := ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) map_zero' := by rw [iSup_apply, ← @Real.ciSup_const_zero s] congr! rename_i _ _ _ i exact map_zero i.1 add_le' := fun x y => by rcases h with ⟨q, hq⟩ obtain rfl | h := s.eq_empty_or_nonempty Β· simp [Real.ciSup_empty] haveI : Nonempty ↑s := h.coe_sort simp only [iSup_apply] refine' ciSup_le fun i => ((i : Seminorm π•œ E).add_le' x y).trans <| add_le_add -- Porting note: `f` is provided to force `Subtype.val` to appear. -- A type ascription on `_` would have also worked, but would have been more verbose. (le_ciSup (f := fun i => (Subtype.val i : Seminorm π•œ E).toFun x) ⟨q x, _⟩ i) (le_ciSup (f := fun i => (Subtype.val i : Seminorm π•œ E).toFun y) ⟨q y, _⟩ i) <;> rw [mem_upperBounds, forall_range_iff] <;> exact fun j => hq (mem_image_of_mem _ j.2) _ neg' := fun x => by simp only [iSup_apply] congr! 2 rename_i _ _ _ i exact i.1.neg' _ smul' := fun a x => by simp only [iSup_apply] rw [← smul_eq_mul, Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π•œ E) x] congr! rename_i _ _ _ i exact i.1.smul' a x } else βŠ₯ protected theorem coe_sSup_eq' {s : Set <| Seminorm π•œ E} (hs : BddAbove ((↑) '' s : Set (E β†’ ℝ))) : ↑(sSup s) = ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) := congr_arg _ (dif_pos hs) #align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq' protected theorem bddAbove_iff {s : Set <| Seminorm π•œ E} : BddAbove s ↔ BddAbove ((↑) '' s : Set (E β†’ ℝ)) := ⟨fun ⟨q, hq⟩ => ⟨q, ball_image_of_ball fun p hp => hq hp⟩, fun H => ⟨sSup s, fun p hp x => by dsimp rw [Seminorm.coe_sSup_eq' H, iSup_apply] rcases H with ⟨q, hq⟩ exact le_ciSup ⟨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) x⟩ ⟨p, hp⟩⟩⟩ #align seminorm.bdd_above_iff Seminorm.bddAbove_iff protected theorem bddAbove_range_iff {p : ΞΉ β†’ Seminorm π•œ E} : BddAbove (range p) ↔ βˆ€ x, BddAbove (range fun i ↦ p i x) := by rw [Seminorm.bddAbove_iff, ← range_comp, bddAbove_range_pi]; rfl protected theorem coe_sSup_eq {s : Set <| Seminorm π•œ E} (hs : BddAbove s) : ↑(sSup s) = ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) := Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs) #align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β†’ Seminorm π•œ E} (hp : BddAbove (range p)) : ↑(⨆ i, p i) = ⨆ i, ((p i : Seminorm π•œ E) : E β†’ ℝ) := by rw [← sSup_range, Seminorm.coe_sSup_eq hp] exact iSup_range' (fun p : Seminorm π•œ E => (p : E β†’ ℝ)) p #align seminorm.coe_supr_eq Seminorm.coe_iSup_eq protected theorem sSup_apply {s : Set (Seminorm π•œ E)} (hp : BddAbove s) {x : E} : (sSup s) x = ⨆ p : s, (p : E β†’ ℝ) x := by rw [Seminorm.coe_sSup_eq hp, iSup_apply] protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β†’ Seminorm π•œ E} (hp : BddAbove (range p)) {x : E} : (⨆ i, p i) x = ⨆ i, p i x := by rw [Seminorm.coe_iSup_eq hp, iSup_apply] protected theorem sSup_empty : sSup (βˆ… : Set (Seminorm π•œ E)) = βŠ₯ := by ext rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty] rfl private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π•œ E)) (hs₁ : BddAbove s) (hsβ‚‚ : s.Nonempty) : IsLUB s (sSup s) := by refine' ⟨fun p hp x => _, fun p hp x => _⟩ <;> haveI : Nonempty ↑s := hsβ‚‚.coe_sort <;> dsimp <;> rw [Seminorm.coe_sSup_eq hs₁, iSup_apply] Β· rcases hs₁ with ⟨q, hq⟩ exact le_ciSup ⟨q x, forall_range_iff.mpr fun i : s => hq i.2 x⟩ ⟨p, hp⟩ Β· exact ciSup_le fun q => hp q.2 x /-- `Seminorm π•œ E` is a conditionally complete lattice. Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you need to use `sInf` on seminorms, then you should probably provide a more workable definition first, but this is unlikely to happen so we keep the "bad" definition for now. -/ noncomputable instance instConditionallyCompleteLattice : ConditionallyCompleteLattice (Seminorm π•œ E) := conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π•œ E) Seminorm.isLUB_sSup end Classical end NormedField /-! ### Seminorm ball -/ section SeminormedRing variable [SeminormedRing π•œ] section AddCommGroup variable [AddCommGroup E] section SMul variable [SMul π•œ E] (p : Seminorm π•œ E) /-- The ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y` with `p (y - x) < r`. -/ def ball (x : E) (r : ℝ) := { y : E | p (y - x) < r } #align seminorm.ball Seminorm.ball /-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y` with `p (y - x) ≀ r`. -/ def closedBall (x : E) (r : ℝ) := { y : E | p (y - x) ≀ r } #align seminorm.closed_ball Seminorm.closedBall variable {x y : E} {r : ℝ} @[simp] theorem mem_ball : y ∈ ball p x r ↔ p (y - x) < r := Iff.rfl #align seminorm.mem_ball Seminorm.mem_ball @[simp] theorem mem_closedBall : y ∈ closedBall p x r ↔ p (y - x) ≀ r := Iff.rfl #align seminorm.mem_closed_ball Seminorm.mem_closedBall theorem mem_ball_self (hr : 0 < r) : x ∈ ball p x r := by simp [hr] #align seminorm.mem_ball_self Seminorm.mem_ball_self theorem mem_closedBall_self (hr : 0 ≀ r) : x ∈ closedBall p x r := by simp [hr] #align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self theorem mem_ball_zero : y ∈ ball p 0 r ↔ p y < r := by rw [mem_ball, sub_zero] #align seminorm.mem_ball_zero Seminorm.mem_ball_zero theorem mem_closedBall_zero : y ∈ closedBall p 0 r ↔ p y ≀ r := by rw [mem_closedBall, sub_zero] #align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } := Set.ext fun _ => p.mem_ball_zero #align seminorm.ball_zero_eq Seminorm.ball_zero_eq theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y ≀ r } := Set.ext fun _ => p.mem_closedBall_zero #align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq theorem ball_subset_closedBall (x r) : ball p x r βŠ† closedBall p x r := fun _ h => (mem_closedBall _).mpr ((mem_ball _).mp h).le #align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β‹‚ ρ > r, ball p x ρ := by ext y; simp_rw [mem_closedBall, mem_iInterβ‚‚, mem_ball, ← forall_lt_iff_le'] #align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball @[simp] theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π•œ E) x r = Set.univ := by rw [Set.eq_univ_iff_forall, ball] simp [hr] #align seminorm.ball_zero' Seminorm.ball_zero' @[simp] theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π•œ E) x r = Set.univ := eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr) #align seminorm.closed_ball_zero' Seminorm.closedBall_zero' theorem ball_smul (p : Seminorm π•œ E) {c : NNReal} (hc : 0 < c) (r : ℝ) (x : E) : (c β€’ p).ball x r = p.ball x (r / c) := by ext rw [mem_ball, mem_ball, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm, lt_div_iff (NNReal.coe_pos.mpr hc)] #align seminorm.ball_smul Seminorm.ball_smul theorem closedBall_smul (p : Seminorm π•œ E) {c : NNReal} (hc : 0 < c) (r : ℝ) (x : E) : (c β€’ p).closedBall x r = p.closedBall x (r / c) := by ext rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm, le_div_iff (NNReal.coe_pos.mpr hc)] #align seminorm.closed_ball_smul Seminorm.closedBall_smul theorem ball_sup (p : Seminorm π•œ E) (q : Seminorm π•œ E) (e : E) (r : ℝ) : ball (p βŠ” q) e r = ball p e r ∩ ball q e r := by
simp_rw [ball, ← Set.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff]
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
Mathlib.Analysis.Seminorm.749_0.ywwMCgoKeIFKDZ3
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
Mathlib_Analysis_Seminorm
R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : SeminormedRing π•œ inst✝¹ : AddCommGroup E inst✝ : SMul π•œ E p✝ : Seminorm π•œ E x y : E r✝ : ℝ p q : Seminorm π•œ E e : E r : ℝ ⊒ closedBall (p βŠ” q) e r = closedBall p e r ∩ closedBall q e r
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, YaΓ«l Dillies, Moritz Doll -/ import Mathlib.Data.Real.Pointwise import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.LocallyConvex.Basic import Mathlib.Analysis.Normed.Group.AddTorsor #align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c" /-! # Seminorms This file defines seminorms. A seminorm is a function to the reals which is positive-semidefinite, absolutely homogeneous, and subadditive. They are closely related to convex sets, and a topological vector space is locally convex if and only if its topology is induced by a family of seminorms. ## Main declarations For a module over a normed ring: * `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and subadditive. * `normSeminorm π•œ E`: The norm on `E` as a seminorm. ## References * [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966] ## Tags seminorm, locally convex, LCTVS -/ set_option autoImplicit true open NormedField Set Filter open scoped BigOperators NNReal Pointwise Topology Uniformity variable {R R' π•œ π•œβ‚‚ π•œβ‚ƒ 𝕝 E Eβ‚‚ E₃ F G ΞΉ : Type*} /-- A seminorm on a module over a normed ring is a function to the reals that is positive semidefinite, positive homogeneous, and subadditive. -/ structure Seminorm (π•œ : Type*) (E : Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminorm E where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ smul' : βˆ€ (a : π•œ) (x : E), toFun (a β€’ x) = β€–aβ€– * toFun x #align seminorm Seminorm attribute [nolint docBlame] Seminorm.toAddGroupSeminorm /-- `SeminormClass F π•œ E` states that `F` is a type of seminorms on the `π•œ`-module `E`. You should extend this class when you extend `Seminorm`. -/ class SeminormClass (F : Type*) (π•œ E : outParam <| Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminormClass F E ℝ where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ map_smul_eq_mul (f : F) (a : π•œ) (x : E) : f (a β€’ x) = β€–aβ€– * f x #align seminorm_class SeminormClass export SeminormClass (map_smul_eq_mul) -- Porting note: dangerous instances no longer exist -- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass section Of /-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a `SeminormedRing π•œ`. -/ def Seminorm.of [SeminormedRing π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (add_le : βˆ€ x y : E, f (x + y) ≀ f x + f y) (smul : βˆ€ (a : π•œ) (x : E), f (a β€’ x) = β€–aβ€– * f x) : Seminorm π•œ E where toFun := f map_zero' := by rw [← zero_smul π•œ (0 : E), smul, norm_zero, zero_mul] add_le' := add_le smul' := smul neg' x := by rw [← neg_one_smul π•œ, smul, norm_neg, ← smul, one_smul] #align seminorm.of Seminorm.of /-- Alternative constructor for a `Seminorm` over a normed field `π•œ` that only assumes `f 0 = 0` and an inequality for the scalar multiplication. -/ def Seminorm.ofSMulLE [NormedField π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (map_zero : f 0 = 0) (add_le : βˆ€ x y, f (x + y) ≀ f x + f y) (smul_le : βˆ€ (r : π•œ) (x), f (r β€’ x) ≀ β€–rβ€– * f x) : Seminorm π•œ E := Seminorm.of f add_le fun r x => by refine' le_antisymm (smul_le r x) _ by_cases h : r = 0 Β· simp [h, map_zero] rw [← mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))] rw [inv_mul_cancel_leftβ‚€ (norm_ne_zero_iff.mpr h)] specialize smul_le r⁻¹ (r β€’ x) rw [norm_inv] at smul_le convert smul_le simp [h] #align seminorm.of_smul_le Seminorm.ofSMulLE end Of namespace Seminorm section SeminormedRing variable [SeminormedRing π•œ] section AddGroup variable [AddGroup E] section SMul variable [SMul π•œ E] instance instSeminormClass : SeminormClass (Seminorm π•œ E) π•œ E where coe f := f.toFun coe_injective' f g h := by rcases f with ⟨⟨_⟩⟩ rcases g with ⟨⟨_⟩⟩ congr map_zero f := f.map_zero' map_add_le_add f := f.add_le' map_neg_eq_map f := f.neg' map_smul_eq_mul f := f.smul' #align seminorm.seminorm_class Seminorm.instSeminormClass /-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/ instance instCoeFun : CoeFun (Seminorm π•œ E) fun _ => E β†’ ℝ := FunLike.hasCoeToFun @[ext] theorem ext {p q : Seminorm π•œ E} (h : βˆ€ x, (p : E β†’ ℝ) x = q x) : p = q := FunLike.ext p q h #align seminorm.ext Seminorm.ext instance instZero : Zero (Seminorm π•œ E) := ⟨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with smul' := fun _ _ => (mul_zero _).symm }⟩ @[simp] theorem coe_zero : ⇑(0 : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_zero Seminorm.coe_zero @[simp] theorem zero_apply (x : E) : (0 : Seminorm π•œ E) x = 0 := rfl #align seminorm.zero_apply Seminorm.zero_apply instance : Inhabited (Seminorm π•œ E) := ⟨0⟩ variable (p : Seminorm π•œ E) (c : π•œ) (x y : E) (r : ℝ) /-- Any action on `ℝ` which factors through `ℝβ‰₯0` applies to a seminorm. -/ instance instSMul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : SMul R (Seminorm π•œ E) where smul r p := { r β€’ p.toAddGroupSeminorm with toFun := fun x => r β€’ p x smul' := fun _ _ => by simp only [← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul] rw [map_smul_eq_mul, mul_left_comm] } instance [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] [SMul R' ℝ] [SMul R' ℝβ‰₯0] [IsScalarTower R' ℝβ‰₯0 ℝ] [SMul R R'] [IsScalarTower R R' ℝ] : IsScalarTower R R' (Seminorm π•œ E) where smul_assoc r a p := ext fun x => smul_assoc r a (p x) theorem coe_smul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) : ⇑(r β€’ p) = r β€’ ⇑p := rfl #align seminorm.coe_smul Seminorm.coe_smul @[simp] theorem smul_apply [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) (x : E) : (r β€’ p) x = r β€’ p x := rfl #align seminorm.smul_apply Seminorm.smul_apply instance instAdd : Add (Seminorm π•œ E) where add p q := { p.toAddGroupSeminorm + q.toAddGroupSeminorm with toFun := fun x => p x + q x smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] } theorem coe_add (p q : Seminorm π•œ E) : ⇑(p + q) = p + q := rfl #align seminorm.coe_add Seminorm.coe_add @[simp] theorem add_apply (p q : Seminorm π•œ E) (x : E) : (p + q) x = p x + q x := rfl #align seminorm.add_apply Seminorm.add_apply instance instAddMonoid : AddMonoid (Seminorm π•œ E) := FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π•œ E) := FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl instance instMulAction [Monoid R] [MulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : MulAction R (Seminorm π•œ E) := FunLike.coe_injective.mulAction _ (by intros; rfl) variable (π•œ E) /-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π•œ E` is a module. -/ @[simps] def coeFnAddMonoidHom : AddMonoidHom (Seminorm π•œ E) (E β†’ ℝ) where toFun := (↑) map_zero' := coe_zero map_add' := coe_add #align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π•œ E) := show @Function.Injective (Seminorm π•œ E) (E β†’ ℝ) (↑) from FunLike.coe_injective #align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective variable {π•œ E} instance instDistribMulAction [Monoid R] [DistribMulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : DistribMulAction R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).distribMulAction _ (by intros; rfl) instance instModule [Semiring R] [Module R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : Module R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).module R _ (by intros; rfl) instance instSup : Sup (Seminorm π•œ E) where sup p q := { p.toAddGroupSeminorm βŠ” q.toAddGroupSeminorm with toFun := p βŠ” q smul' := fun x v => (congr_argβ‚‚ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <| (mul_max_of_nonneg _ _ <| norm_nonneg x).symm } @[simp] theorem coe_sup (p q : Seminorm π•œ E) : ⇑(p βŠ” q) = (p : E β†’ ℝ) βŠ” (q : E β†’ ℝ) := rfl #align seminorm.coe_sup Seminorm.coe_sup theorem sup_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ” q) x = p x βŠ” q x := rfl #align seminorm.sup_apply Seminorm.sup_apply theorem smul_sup [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ” q) = r β€’ p βŠ” r β€’ q := have real.smul_max : βˆ€ x y : ℝ, r β€’ max x y = max (r β€’ x) (r β€’ y) := fun x y => by simpa only [← smul_eq_mul, ← NNReal.smul_def, smul_one_smul ℝβ‰₯0 r (_ : ℝ)] using mul_max_of_nonneg x y (r β€’ (1 : ℝβ‰₯0) : ℝβ‰₯0).coe_nonneg ext fun x => real.smul_max _ _ #align seminorm.smul_sup Seminorm.smul_sup instance instPartialOrder : PartialOrder (Seminorm π•œ E) := PartialOrder.lift _ FunLike.coe_injective @[simp, norm_cast] theorem coe_le_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) ≀ q ↔ p ≀ q := Iff.rfl #align seminorm.coe_le_coe Seminorm.coe_le_coe @[simp, norm_cast] theorem coe_lt_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) < q ↔ p < q := Iff.rfl #align seminorm.coe_lt_coe Seminorm.coe_lt_coe theorem le_def {p q : Seminorm π•œ E} : p ≀ q ↔ βˆ€ x, p x ≀ q x := Iff.rfl #align seminorm.le_def Seminorm.le_def theorem lt_def {p q : Seminorm π•œ E} : p < q ↔ p ≀ q ∧ βˆƒ x, p x < q x := @Pi.lt_def _ _ _ p q #align seminorm.lt_def Seminorm.lt_def instance instSemilatticeSup : SemilatticeSup (Seminorm π•œ E) := Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup end SMul end AddGroup section Module variable [SeminormedRing π•œβ‚‚] [SeminormedRing π•œβ‚ƒ] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable {σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₂₃] variable {σ₁₃ : π•œ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₁₃] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [AddCommGroup E₃] variable [AddCommGroup F] [AddCommGroup G] variable [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] [Module π•œβ‚ƒ E₃] [Module π•œ F] [Module π•œ G] -- Porting note: even though this instance is found immediately by typeclass search, -- it seems to be needed below!? noncomputable instance smul_nnreal_real : SMul ℝβ‰₯0 ℝ := inferInstance variable [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] /-- Composition of a seminorm with a linear map is a seminorm. -/ def comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œ E := { p.toAddGroupSeminorm.comp f.toAddMonoidHom with toFun := fun x => p (f x) -- Porting note: the `simp only` below used to be part of the `rw`. -- I'm not sure why this change was needed, and am worried by it! smul' := fun _ _ => by simp only [map_smulβ‚›β‚—]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] } #align seminorm.comp Seminorm.comp theorem coe_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : ⇑(p.comp f) = p ∘ f := rfl #align seminorm.coe_comp Seminorm.coe_comp @[simp] theorem comp_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (x : E) : (p.comp f) x = p (f x) := rfl #align seminorm.comp_apply Seminorm.comp_apply @[simp] theorem comp_id (p : Seminorm π•œ E) : p.comp LinearMap.id = p := ext fun _ => rfl #align seminorm.comp_id Seminorm.comp_id @[simp] theorem comp_zero (p : Seminorm π•œβ‚‚ Eβ‚‚) : p.comp (0 : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) = 0 := ext fun _ => map_zero p #align seminorm.comp_zero Seminorm.comp_zero @[simp] theorem zero_comp (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (0 : Seminorm π•œβ‚‚ Eβ‚‚).comp f = 0 := ext fun _ => rfl #align seminorm.zero_comp Seminorm.zero_comp theorem comp_comp [RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] (p : Seminorm π•œβ‚ƒ E₃) (g : Eβ‚‚ β†’β‚›β‚—[σ₂₃] E₃) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (g.comp f) = (p.comp g).comp f := ext fun _ => rfl #align seminorm.comp_comp Seminorm.comp_comp theorem add_comp (p q : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (p + q).comp f = p.comp f + q.comp f := ext fun _ => rfl #align seminorm.add_comp Seminorm.add_comp theorem comp_add_le (p : Seminorm π•œβ‚‚ Eβ‚‚) (f g : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (f + g) ≀ p.comp f + p.comp g := fun _ => map_add_le_add p _ _ #align seminorm.comp_add_le Seminorm.comp_add_le theorem smul_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : R) : (c β€’ p).comp f = c β€’ p.comp f := ext fun _ => rfl #align seminorm.smul_comp Seminorm.smul_comp theorem comp_mono {p q : Seminorm π•œβ‚‚ Eβ‚‚} (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (hp : p ≀ q) : p.comp f ≀ q.comp f := fun _ => hp _ #align seminorm.comp_mono Seminorm.comp_mono /-- The composition as an `AddMonoidHom`. -/ @[simps] def pullback (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œβ‚‚ Eβ‚‚ β†’+ Seminorm π•œ E where toFun := fun p => p.comp f map_zero' := zero_comp f map_add' := fun p q => add_comp p q f #align seminorm.pullback Seminorm.pullback instance instOrderBot : OrderBot (Seminorm π•œ E) where bot := 0 bot_le := map_nonneg @[simp] theorem coe_bot : ⇑(βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_bot Seminorm.coe_bot theorem bot_eq_zero : (βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.bot_eq_zero Seminorm.bot_eq_zero theorem smul_le_smul {p q : Seminorm π•œ E} {a b : ℝβ‰₯0} (hpq : p ≀ q) (hab : a ≀ b) : a β€’ p ≀ b β€’ q := by simp_rw [le_def] intro x exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b) #align seminorm.smul_le_smul Seminorm.smul_le_smul theorem finset_sup_apply (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = ↑(s.sup fun i => ⟨p i x, map_nonneg (p i) x⟩ : ℝβ‰₯0) := by induction' s using Finset.cons_induction_on with a s ha ih Β· rw [Finset.sup_empty, Finset.sup_empty, coe_bot, _root_.bot_eq_zero, Pi.zero_apply] norm_cast Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max, NNReal.coe_max, NNReal.coe_mk, ih] #align seminorm.finset_sup_apply Seminorm.finset_sup_apply theorem exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) : βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.exists_mem_eq_sup s hs (fun i ↦ (⟨p i x, map_nonneg _ _⟩ : ℝβ‰₯0)) with ⟨i, hi, hix⟩ rw [finset_sup_apply] exact ⟨i, hi, congr_arg _ hix⟩ theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = 0 ∨ βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.eq_empty_or_nonempty s with (rfl|hs) Β· left; rfl Β· right; exact exists_apply_eq_finset_sup p hs x theorem finset_sup_smul (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (C : ℝβ‰₯0) : s.sup (C β€’ p) = C β€’ s.sup p := by ext x rw [smul_apply, finset_sup_apply, finset_sup_apply] symm exact congr_arg ((↑) : ℝβ‰₯0 β†’ ℝ) (NNReal.mul_finset_sup C s (fun i ↦ ⟨p i x, map_nonneg _ _⟩)) theorem finset_sup_le_sum (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) : s.sup p ≀ βˆ‘ i in s, p i := by classical refine' Finset.sup_le_iff.mpr _ intro i hi rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left] exact bot_le #align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum theorem finset_sup_apply_le {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 ≀ a) (h : βˆ€ i, i ∈ s β†’ p i x ≀ a) : s.sup p x ≀ a := by lift a to ℝβ‰₯0 using ha rw [finset_sup_apply, NNReal.coe_le_coe] exact Finset.sup_le h #align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le theorem le_finset_sup_apply {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {i : ΞΉ} (hi : i ∈ s) : p i x ≀ s.sup p x := (Finset.le_sup hi : p i ≀ s.sup p) x theorem finset_sup_apply_lt {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 < a) (h : βˆ€ i, i ∈ s β†’ p i x < a) : s.sup p x < a := by lift a to ℝβ‰₯0 using ha.le rw [finset_sup_apply, NNReal.coe_lt_coe, Finset.sup_lt_iff] Β· exact h Β· exact NNReal.coe_pos.mpr ha #align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt theorem norm_sub_map_le_sub (p : Seminorm π•œ E) (x y : E) : β€–p x - p yβ€– ≀ p (x - y) := abs_sub_map_le_sub p x y #align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub end Module end SeminormedRing section SeminormedCommRing variable [SeminormedRing π•œ] [SeminormedCommRing π•œβ‚‚] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] theorem comp_smul (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) : p.comp (c β€’ f) = β€–cβ€–β‚Š β€’ p.comp f := ext fun _ => by rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm, smul_eq_mul, comp_apply] #align seminorm.comp_smul Seminorm.comp_smul theorem comp_smul_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) (x : E) : p.comp (c β€’ f) x = β€–cβ€– * p (f x) := map_smul_eq_mul p _ _ #align seminorm.comp_smul_apply Seminorm.comp_smul_apply end SeminormedCommRing section NormedField variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] {p q : Seminorm π•œ E} {x : E} /-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/ theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) := ⟨0, by rintro _ ⟨x, rfl⟩ dsimp; positivity⟩ #align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add noncomputable instance instInf : Inf (Seminorm π•œ E) where inf p q := { p.toAddGroupSeminorm βŠ“ q.toAddGroupSeminorm with toFun := fun x => β¨… u : E, p u + q (x - u) smul' := by intro a x obtain rfl | ha := eq_or_ne a 0 Β· rw [norm_zero, zero_mul, zero_smul] refine' ciInf_eq_of_forall_ge_of_forall_gt_exists_lt -- Porting note: the following was previously `fun i => by positivity` (fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _)) fun x hx => ⟨0, by rwa [map_zero, sub_zero, map_zero, add_zero]⟩ simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, ← map_smul_eq_mul p, ← map_smul_eq_mul q, smul_sub] refine' Function.Surjective.iInf_congr ((a⁻¹ β€’ Β·) : E β†’ E) (fun u => ⟨a β€’ u, inv_smul_smulβ‚€ ha u⟩) fun u => _ rw [smul_inv_smulβ‚€ ha] } @[simp] theorem inf_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ“ q) x = β¨… u : E, p u + q (x - u) := rfl #align seminorm.inf_apply Seminorm.inf_apply noncomputable instance instLattice : Lattice (Seminorm π•œ E) := { Seminorm.instSemilatticeSup with inf := (Β· βŠ“ Β·) inf_le_left := fun p q x => ciInf_le_of_le bddBelow_range_add x <| by simp only [sub_self, map_zero, add_zero]; rfl inf_le_right := fun p q x => ciInf_le_of_le bddBelow_range_add 0 <| by simp only [sub_self, map_zero, zero_add, sub_zero]; rfl le_inf := fun a b c hab hac x => le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) } theorem smul_inf [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ“ q) = r β€’ p βŠ“ r β€’ q := by ext simp_rw [smul_apply, inf_apply, smul_apply, ← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add] #align seminorm.smul_inf Seminorm.smul_inf section Classical open Classical /-- We define the supremum of an arbitrary subset of `Seminorm π•œ E` as follows: * if `s` is `BddAbove` *as a set of functions `E β†’ ℝ`* (that is, if `s` is pointwise bounded above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a seminorm. * otherwise, we take the zero seminorm `βŠ₯`. There are two things worth mentioning here: * First, it is not trivial at first that `s` being bounded above *by a function* implies being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make the case disjunction on `BddAbove ((↑) '' s : Set (E β†’ ℝ))` and not `BddAbove s`. * Since the pointwise `Sup` already gives `0` at points where a family of functions is not bounded above, one could hope that just using the pointwise `Sup` would work here, without the need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can give a function which does *not* satisfy the seminorm axioms (typically sub-additivity). -/ noncomputable instance instSupSet : SupSet (Seminorm π•œ E) where sSup s := if h : BddAbove ((↑) '' s : Set (E β†’ ℝ)) then { toFun := ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) map_zero' := by rw [iSup_apply, ← @Real.ciSup_const_zero s] congr! rename_i _ _ _ i exact map_zero i.1 add_le' := fun x y => by rcases h with ⟨q, hq⟩ obtain rfl | h := s.eq_empty_or_nonempty Β· simp [Real.ciSup_empty] haveI : Nonempty ↑s := h.coe_sort simp only [iSup_apply] refine' ciSup_le fun i => ((i : Seminorm π•œ E).add_le' x y).trans <| add_le_add -- Porting note: `f` is provided to force `Subtype.val` to appear. -- A type ascription on `_` would have also worked, but would have been more verbose. (le_ciSup (f := fun i => (Subtype.val i : Seminorm π•œ E).toFun x) ⟨q x, _⟩ i) (le_ciSup (f := fun i => (Subtype.val i : Seminorm π•œ E).toFun y) ⟨q y, _⟩ i) <;> rw [mem_upperBounds, forall_range_iff] <;> exact fun j => hq (mem_image_of_mem _ j.2) _ neg' := fun x => by simp only [iSup_apply] congr! 2 rename_i _ _ _ i exact i.1.neg' _ smul' := fun a x => by simp only [iSup_apply] rw [← smul_eq_mul, Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π•œ E) x] congr! rename_i _ _ _ i exact i.1.smul' a x } else βŠ₯ protected theorem coe_sSup_eq' {s : Set <| Seminorm π•œ E} (hs : BddAbove ((↑) '' s : Set (E β†’ ℝ))) : ↑(sSup s) = ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) := congr_arg _ (dif_pos hs) #align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq' protected theorem bddAbove_iff {s : Set <| Seminorm π•œ E} : BddAbove s ↔ BddAbove ((↑) '' s : Set (E β†’ ℝ)) := ⟨fun ⟨q, hq⟩ => ⟨q, ball_image_of_ball fun p hp => hq hp⟩, fun H => ⟨sSup s, fun p hp x => by dsimp rw [Seminorm.coe_sSup_eq' H, iSup_apply] rcases H with ⟨q, hq⟩ exact le_ciSup ⟨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) x⟩ ⟨p, hp⟩⟩⟩ #align seminorm.bdd_above_iff Seminorm.bddAbove_iff protected theorem bddAbove_range_iff {p : ΞΉ β†’ Seminorm π•œ E} : BddAbove (range p) ↔ βˆ€ x, BddAbove (range fun i ↦ p i x) := by rw [Seminorm.bddAbove_iff, ← range_comp, bddAbove_range_pi]; rfl protected theorem coe_sSup_eq {s : Set <| Seminorm π•œ E} (hs : BddAbove s) : ↑(sSup s) = ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) := Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs) #align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β†’ Seminorm π•œ E} (hp : BddAbove (range p)) : ↑(⨆ i, p i) = ⨆ i, ((p i : Seminorm π•œ E) : E β†’ ℝ) := by rw [← sSup_range, Seminorm.coe_sSup_eq hp] exact iSup_range' (fun p : Seminorm π•œ E => (p : E β†’ ℝ)) p #align seminorm.coe_supr_eq Seminorm.coe_iSup_eq protected theorem sSup_apply {s : Set (Seminorm π•œ E)} (hp : BddAbove s) {x : E} : (sSup s) x = ⨆ p : s, (p : E β†’ ℝ) x := by rw [Seminorm.coe_sSup_eq hp, iSup_apply] protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β†’ Seminorm π•œ E} (hp : BddAbove (range p)) {x : E} : (⨆ i, p i) x = ⨆ i, p i x := by rw [Seminorm.coe_iSup_eq hp, iSup_apply] protected theorem sSup_empty : sSup (βˆ… : Set (Seminorm π•œ E)) = βŠ₯ := by ext rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty] rfl private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π•œ E)) (hs₁ : BddAbove s) (hsβ‚‚ : s.Nonempty) : IsLUB s (sSup s) := by refine' ⟨fun p hp x => _, fun p hp x => _⟩ <;> haveI : Nonempty ↑s := hsβ‚‚.coe_sort <;> dsimp <;> rw [Seminorm.coe_sSup_eq hs₁, iSup_apply] Β· rcases hs₁ with ⟨q, hq⟩ exact le_ciSup ⟨q x, forall_range_iff.mpr fun i : s => hq i.2 x⟩ ⟨p, hp⟩ Β· exact ciSup_le fun q => hp q.2 x /-- `Seminorm π•œ E` is a conditionally complete lattice. Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you need to use `sInf` on seminorms, then you should probably provide a more workable definition first, but this is unlikely to happen so we keep the "bad" definition for now. -/ noncomputable instance instConditionallyCompleteLattice : ConditionallyCompleteLattice (Seminorm π•œ E) := conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π•œ E) Seminorm.isLUB_sSup end Classical end NormedField /-! ### Seminorm ball -/ section SeminormedRing variable [SeminormedRing π•œ] section AddCommGroup variable [AddCommGroup E] section SMul variable [SMul π•œ E] (p : Seminorm π•œ E) /-- The ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y` with `p (y - x) < r`. -/ def ball (x : E) (r : ℝ) := { y : E | p (y - x) < r } #align seminorm.ball Seminorm.ball /-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y` with `p (y - x) ≀ r`. -/ def closedBall (x : E) (r : ℝ) := { y : E | p (y - x) ≀ r } #align seminorm.closed_ball Seminorm.closedBall variable {x y : E} {r : ℝ} @[simp] theorem mem_ball : y ∈ ball p x r ↔ p (y - x) < r := Iff.rfl #align seminorm.mem_ball Seminorm.mem_ball @[simp] theorem mem_closedBall : y ∈ closedBall p x r ↔ p (y - x) ≀ r := Iff.rfl #align seminorm.mem_closed_ball Seminorm.mem_closedBall theorem mem_ball_self (hr : 0 < r) : x ∈ ball p x r := by simp [hr] #align seminorm.mem_ball_self Seminorm.mem_ball_self theorem mem_closedBall_self (hr : 0 ≀ r) : x ∈ closedBall p x r := by simp [hr] #align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self theorem mem_ball_zero : y ∈ ball p 0 r ↔ p y < r := by rw [mem_ball, sub_zero] #align seminorm.mem_ball_zero Seminorm.mem_ball_zero theorem mem_closedBall_zero : y ∈ closedBall p 0 r ↔ p y ≀ r := by rw [mem_closedBall, sub_zero] #align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } := Set.ext fun _ => p.mem_ball_zero #align seminorm.ball_zero_eq Seminorm.ball_zero_eq theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y ≀ r } := Set.ext fun _ => p.mem_closedBall_zero #align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq theorem ball_subset_closedBall (x r) : ball p x r βŠ† closedBall p x r := fun _ h => (mem_closedBall _).mpr ((mem_ball _).mp h).le #align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β‹‚ ρ > r, ball p x ρ := by ext y; simp_rw [mem_closedBall, mem_iInterβ‚‚, mem_ball, ← forall_lt_iff_le'] #align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball @[simp] theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π•œ E) x r = Set.univ := by rw [Set.eq_univ_iff_forall, ball] simp [hr] #align seminorm.ball_zero' Seminorm.ball_zero' @[simp] theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π•œ E) x r = Set.univ := eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr) #align seminorm.closed_ball_zero' Seminorm.closedBall_zero' theorem ball_smul (p : Seminorm π•œ E) {c : NNReal} (hc : 0 < c) (r : ℝ) (x : E) : (c β€’ p).ball x r = p.ball x (r / c) := by ext rw [mem_ball, mem_ball, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm, lt_div_iff (NNReal.coe_pos.mpr hc)] #align seminorm.ball_smul Seminorm.ball_smul theorem closedBall_smul (p : Seminorm π•œ E) {c : NNReal} (hc : 0 < c) (r : ℝ) (x : E) : (c β€’ p).closedBall x r = p.closedBall x (r / c) := by ext rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm, le_div_iff (NNReal.coe_pos.mpr hc)] #align seminorm.closed_ball_smul Seminorm.closedBall_smul theorem ball_sup (p : Seminorm π•œ E) (q : Seminorm π•œ E) (e : E) (r : ℝ) : ball (p βŠ” q) e r = ball p e r ∩ ball q e r := by simp_rw [ball, ← Set.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff] #align seminorm.ball_sup Seminorm.ball_sup theorem closedBall_sup (p : Seminorm π•œ E) (q : Seminorm π•œ E) (e : E) (r : ℝ) : closedBall (p βŠ” q) e r = closedBall p e r ∩ closedBall q e r := by
simp_rw [closedBall, ← Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff]
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
Mathlib.Analysis.Seminorm.754_0.ywwMCgoKeIFKDZ3
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
Mathlib_Analysis_Seminorm
R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : SeminormedRing π•œ inst✝¹ : AddCommGroup E inst✝ : SMul π•œ E p✝ : Seminorm π•œ E x y : E r✝ : ℝ p : ΞΉ β†’ Seminorm π•œ E s : Finset ΞΉ H : Finset.Nonempty s e : E r : ℝ ⊒ ball (Finset.sup' s H p) e r = Finset.inf' s H fun i => ball (p i) e r
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, YaΓ«l Dillies, Moritz Doll -/ import Mathlib.Data.Real.Pointwise import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.LocallyConvex.Basic import Mathlib.Analysis.Normed.Group.AddTorsor #align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c" /-! # Seminorms This file defines seminorms. A seminorm is a function to the reals which is positive-semidefinite, absolutely homogeneous, and subadditive. They are closely related to convex sets, and a topological vector space is locally convex if and only if its topology is induced by a family of seminorms. ## Main declarations For a module over a normed ring: * `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and subadditive. * `normSeminorm π•œ E`: The norm on `E` as a seminorm. ## References * [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966] ## Tags seminorm, locally convex, LCTVS -/ set_option autoImplicit true open NormedField Set Filter open scoped BigOperators NNReal Pointwise Topology Uniformity variable {R R' π•œ π•œβ‚‚ π•œβ‚ƒ 𝕝 E Eβ‚‚ E₃ F G ΞΉ : Type*} /-- A seminorm on a module over a normed ring is a function to the reals that is positive semidefinite, positive homogeneous, and subadditive. -/ structure Seminorm (π•œ : Type*) (E : Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminorm E where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ smul' : βˆ€ (a : π•œ) (x : E), toFun (a β€’ x) = β€–aβ€– * toFun x #align seminorm Seminorm attribute [nolint docBlame] Seminorm.toAddGroupSeminorm /-- `SeminormClass F π•œ E` states that `F` is a type of seminorms on the `π•œ`-module `E`. You should extend this class when you extend `Seminorm`. -/ class SeminormClass (F : Type*) (π•œ E : outParam <| Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminormClass F E ℝ where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ map_smul_eq_mul (f : F) (a : π•œ) (x : E) : f (a β€’ x) = β€–aβ€– * f x #align seminorm_class SeminormClass export SeminormClass (map_smul_eq_mul) -- Porting note: dangerous instances no longer exist -- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass section Of /-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a `SeminormedRing π•œ`. -/ def Seminorm.of [SeminormedRing π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (add_le : βˆ€ x y : E, f (x + y) ≀ f x + f y) (smul : βˆ€ (a : π•œ) (x : E), f (a β€’ x) = β€–aβ€– * f x) : Seminorm π•œ E where toFun := f map_zero' := by rw [← zero_smul π•œ (0 : E), smul, norm_zero, zero_mul] add_le' := add_le smul' := smul neg' x := by rw [← neg_one_smul π•œ, smul, norm_neg, ← smul, one_smul] #align seminorm.of Seminorm.of /-- Alternative constructor for a `Seminorm` over a normed field `π•œ` that only assumes `f 0 = 0` and an inequality for the scalar multiplication. -/ def Seminorm.ofSMulLE [NormedField π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (map_zero : f 0 = 0) (add_le : βˆ€ x y, f (x + y) ≀ f x + f y) (smul_le : βˆ€ (r : π•œ) (x), f (r β€’ x) ≀ β€–rβ€– * f x) : Seminorm π•œ E := Seminorm.of f add_le fun r x => by refine' le_antisymm (smul_le r x) _ by_cases h : r = 0 Β· simp [h, map_zero] rw [← mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))] rw [inv_mul_cancel_leftβ‚€ (norm_ne_zero_iff.mpr h)] specialize smul_le r⁻¹ (r β€’ x) rw [norm_inv] at smul_le convert smul_le simp [h] #align seminorm.of_smul_le Seminorm.ofSMulLE end Of namespace Seminorm section SeminormedRing variable [SeminormedRing π•œ] section AddGroup variable [AddGroup E] section SMul variable [SMul π•œ E] instance instSeminormClass : SeminormClass (Seminorm π•œ E) π•œ E where coe f := f.toFun coe_injective' f g h := by rcases f with ⟨⟨_⟩⟩ rcases g with ⟨⟨_⟩⟩ congr map_zero f := f.map_zero' map_add_le_add f := f.add_le' map_neg_eq_map f := f.neg' map_smul_eq_mul f := f.smul' #align seminorm.seminorm_class Seminorm.instSeminormClass /-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/ instance instCoeFun : CoeFun (Seminorm π•œ E) fun _ => E β†’ ℝ := FunLike.hasCoeToFun @[ext] theorem ext {p q : Seminorm π•œ E} (h : βˆ€ x, (p : E β†’ ℝ) x = q x) : p = q := FunLike.ext p q h #align seminorm.ext Seminorm.ext instance instZero : Zero (Seminorm π•œ E) := ⟨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with smul' := fun _ _ => (mul_zero _).symm }⟩ @[simp] theorem coe_zero : ⇑(0 : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_zero Seminorm.coe_zero @[simp] theorem zero_apply (x : E) : (0 : Seminorm π•œ E) x = 0 := rfl #align seminorm.zero_apply Seminorm.zero_apply instance : Inhabited (Seminorm π•œ E) := ⟨0⟩ variable (p : Seminorm π•œ E) (c : π•œ) (x y : E) (r : ℝ) /-- Any action on `ℝ` which factors through `ℝβ‰₯0` applies to a seminorm. -/ instance instSMul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : SMul R (Seminorm π•œ E) where smul r p := { r β€’ p.toAddGroupSeminorm with toFun := fun x => r β€’ p x smul' := fun _ _ => by simp only [← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul] rw [map_smul_eq_mul, mul_left_comm] } instance [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] [SMul R' ℝ] [SMul R' ℝβ‰₯0] [IsScalarTower R' ℝβ‰₯0 ℝ] [SMul R R'] [IsScalarTower R R' ℝ] : IsScalarTower R R' (Seminorm π•œ E) where smul_assoc r a p := ext fun x => smul_assoc r a (p x) theorem coe_smul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) : ⇑(r β€’ p) = r β€’ ⇑p := rfl #align seminorm.coe_smul Seminorm.coe_smul @[simp] theorem smul_apply [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) (x : E) : (r β€’ p) x = r β€’ p x := rfl #align seminorm.smul_apply Seminorm.smul_apply instance instAdd : Add (Seminorm π•œ E) where add p q := { p.toAddGroupSeminorm + q.toAddGroupSeminorm with toFun := fun x => p x + q x smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] } theorem coe_add (p q : Seminorm π•œ E) : ⇑(p + q) = p + q := rfl #align seminorm.coe_add Seminorm.coe_add @[simp] theorem add_apply (p q : Seminorm π•œ E) (x : E) : (p + q) x = p x + q x := rfl #align seminorm.add_apply Seminorm.add_apply instance instAddMonoid : AddMonoid (Seminorm π•œ E) := FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π•œ E) := FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl instance instMulAction [Monoid R] [MulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : MulAction R (Seminorm π•œ E) := FunLike.coe_injective.mulAction _ (by intros; rfl) variable (π•œ E) /-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π•œ E` is a module. -/ @[simps] def coeFnAddMonoidHom : AddMonoidHom (Seminorm π•œ E) (E β†’ ℝ) where toFun := (↑) map_zero' := coe_zero map_add' := coe_add #align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π•œ E) := show @Function.Injective (Seminorm π•œ E) (E β†’ ℝ) (↑) from FunLike.coe_injective #align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective variable {π•œ E} instance instDistribMulAction [Monoid R] [DistribMulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : DistribMulAction R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).distribMulAction _ (by intros; rfl) instance instModule [Semiring R] [Module R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : Module R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).module R _ (by intros; rfl) instance instSup : Sup (Seminorm π•œ E) where sup p q := { p.toAddGroupSeminorm βŠ” q.toAddGroupSeminorm with toFun := p βŠ” q smul' := fun x v => (congr_argβ‚‚ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <| (mul_max_of_nonneg _ _ <| norm_nonneg x).symm } @[simp] theorem coe_sup (p q : Seminorm π•œ E) : ⇑(p βŠ” q) = (p : E β†’ ℝ) βŠ” (q : E β†’ ℝ) := rfl #align seminorm.coe_sup Seminorm.coe_sup theorem sup_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ” q) x = p x βŠ” q x := rfl #align seminorm.sup_apply Seminorm.sup_apply theorem smul_sup [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ” q) = r β€’ p βŠ” r β€’ q := have real.smul_max : βˆ€ x y : ℝ, r β€’ max x y = max (r β€’ x) (r β€’ y) := fun x y => by simpa only [← smul_eq_mul, ← NNReal.smul_def, smul_one_smul ℝβ‰₯0 r (_ : ℝ)] using mul_max_of_nonneg x y (r β€’ (1 : ℝβ‰₯0) : ℝβ‰₯0).coe_nonneg ext fun x => real.smul_max _ _ #align seminorm.smul_sup Seminorm.smul_sup instance instPartialOrder : PartialOrder (Seminorm π•œ E) := PartialOrder.lift _ FunLike.coe_injective @[simp, norm_cast] theorem coe_le_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) ≀ q ↔ p ≀ q := Iff.rfl #align seminorm.coe_le_coe Seminorm.coe_le_coe @[simp, norm_cast] theorem coe_lt_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) < q ↔ p < q := Iff.rfl #align seminorm.coe_lt_coe Seminorm.coe_lt_coe theorem le_def {p q : Seminorm π•œ E} : p ≀ q ↔ βˆ€ x, p x ≀ q x := Iff.rfl #align seminorm.le_def Seminorm.le_def theorem lt_def {p q : Seminorm π•œ E} : p < q ↔ p ≀ q ∧ βˆƒ x, p x < q x := @Pi.lt_def _ _ _ p q #align seminorm.lt_def Seminorm.lt_def instance instSemilatticeSup : SemilatticeSup (Seminorm π•œ E) := Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup end SMul end AddGroup section Module variable [SeminormedRing π•œβ‚‚] [SeminormedRing π•œβ‚ƒ] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable {σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₂₃] variable {σ₁₃ : π•œ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₁₃] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [AddCommGroup E₃] variable [AddCommGroup F] [AddCommGroup G] variable [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] [Module π•œβ‚ƒ E₃] [Module π•œ F] [Module π•œ G] -- Porting note: even though this instance is found immediately by typeclass search, -- it seems to be needed below!? noncomputable instance smul_nnreal_real : SMul ℝβ‰₯0 ℝ := inferInstance variable [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] /-- Composition of a seminorm with a linear map is a seminorm. -/ def comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œ E := { p.toAddGroupSeminorm.comp f.toAddMonoidHom with toFun := fun x => p (f x) -- Porting note: the `simp only` below used to be part of the `rw`. -- I'm not sure why this change was needed, and am worried by it! smul' := fun _ _ => by simp only [map_smulβ‚›β‚—]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] } #align seminorm.comp Seminorm.comp theorem coe_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : ⇑(p.comp f) = p ∘ f := rfl #align seminorm.coe_comp Seminorm.coe_comp @[simp] theorem comp_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (x : E) : (p.comp f) x = p (f x) := rfl #align seminorm.comp_apply Seminorm.comp_apply @[simp] theorem comp_id (p : Seminorm π•œ E) : p.comp LinearMap.id = p := ext fun _ => rfl #align seminorm.comp_id Seminorm.comp_id @[simp] theorem comp_zero (p : Seminorm π•œβ‚‚ Eβ‚‚) : p.comp (0 : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) = 0 := ext fun _ => map_zero p #align seminorm.comp_zero Seminorm.comp_zero @[simp] theorem zero_comp (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (0 : Seminorm π•œβ‚‚ Eβ‚‚).comp f = 0 := ext fun _ => rfl #align seminorm.zero_comp Seminorm.zero_comp theorem comp_comp [RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] (p : Seminorm π•œβ‚ƒ E₃) (g : Eβ‚‚ β†’β‚›β‚—[σ₂₃] E₃) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (g.comp f) = (p.comp g).comp f := ext fun _ => rfl #align seminorm.comp_comp Seminorm.comp_comp theorem add_comp (p q : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (p + q).comp f = p.comp f + q.comp f := ext fun _ => rfl #align seminorm.add_comp Seminorm.add_comp theorem comp_add_le (p : Seminorm π•œβ‚‚ Eβ‚‚) (f g : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (f + g) ≀ p.comp f + p.comp g := fun _ => map_add_le_add p _ _ #align seminorm.comp_add_le Seminorm.comp_add_le theorem smul_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : R) : (c β€’ p).comp f = c β€’ p.comp f := ext fun _ => rfl #align seminorm.smul_comp Seminorm.smul_comp theorem comp_mono {p q : Seminorm π•œβ‚‚ Eβ‚‚} (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (hp : p ≀ q) : p.comp f ≀ q.comp f := fun _ => hp _ #align seminorm.comp_mono Seminorm.comp_mono /-- The composition as an `AddMonoidHom`. -/ @[simps] def pullback (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œβ‚‚ Eβ‚‚ β†’+ Seminorm π•œ E where toFun := fun p => p.comp f map_zero' := zero_comp f map_add' := fun p q => add_comp p q f #align seminorm.pullback Seminorm.pullback instance instOrderBot : OrderBot (Seminorm π•œ E) where bot := 0 bot_le := map_nonneg @[simp] theorem coe_bot : ⇑(βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_bot Seminorm.coe_bot theorem bot_eq_zero : (βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.bot_eq_zero Seminorm.bot_eq_zero theorem smul_le_smul {p q : Seminorm π•œ E} {a b : ℝβ‰₯0} (hpq : p ≀ q) (hab : a ≀ b) : a β€’ p ≀ b β€’ q := by simp_rw [le_def] intro x exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b) #align seminorm.smul_le_smul Seminorm.smul_le_smul theorem finset_sup_apply (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = ↑(s.sup fun i => ⟨p i x, map_nonneg (p i) x⟩ : ℝβ‰₯0) := by induction' s using Finset.cons_induction_on with a s ha ih Β· rw [Finset.sup_empty, Finset.sup_empty, coe_bot, _root_.bot_eq_zero, Pi.zero_apply] norm_cast Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max, NNReal.coe_max, NNReal.coe_mk, ih] #align seminorm.finset_sup_apply Seminorm.finset_sup_apply theorem exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) : βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.exists_mem_eq_sup s hs (fun i ↦ (⟨p i x, map_nonneg _ _⟩ : ℝβ‰₯0)) with ⟨i, hi, hix⟩ rw [finset_sup_apply] exact ⟨i, hi, congr_arg _ hix⟩ theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = 0 ∨ βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.eq_empty_or_nonempty s with (rfl|hs) Β· left; rfl Β· right; exact exists_apply_eq_finset_sup p hs x theorem finset_sup_smul (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (C : ℝβ‰₯0) : s.sup (C β€’ p) = C β€’ s.sup p := by ext x rw [smul_apply, finset_sup_apply, finset_sup_apply] symm exact congr_arg ((↑) : ℝβ‰₯0 β†’ ℝ) (NNReal.mul_finset_sup C s (fun i ↦ ⟨p i x, map_nonneg _ _⟩)) theorem finset_sup_le_sum (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) : s.sup p ≀ βˆ‘ i in s, p i := by classical refine' Finset.sup_le_iff.mpr _ intro i hi rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left] exact bot_le #align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum theorem finset_sup_apply_le {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 ≀ a) (h : βˆ€ i, i ∈ s β†’ p i x ≀ a) : s.sup p x ≀ a := by lift a to ℝβ‰₯0 using ha rw [finset_sup_apply, NNReal.coe_le_coe] exact Finset.sup_le h #align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le theorem le_finset_sup_apply {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {i : ΞΉ} (hi : i ∈ s) : p i x ≀ s.sup p x := (Finset.le_sup hi : p i ≀ s.sup p) x theorem finset_sup_apply_lt {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 < a) (h : βˆ€ i, i ∈ s β†’ p i x < a) : s.sup p x < a := by lift a to ℝβ‰₯0 using ha.le rw [finset_sup_apply, NNReal.coe_lt_coe, Finset.sup_lt_iff] Β· exact h Β· exact NNReal.coe_pos.mpr ha #align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt theorem norm_sub_map_le_sub (p : Seminorm π•œ E) (x y : E) : β€–p x - p yβ€– ≀ p (x - y) := abs_sub_map_le_sub p x y #align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub end Module end SeminormedRing section SeminormedCommRing variable [SeminormedRing π•œ] [SeminormedCommRing π•œβ‚‚] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] theorem comp_smul (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) : p.comp (c β€’ f) = β€–cβ€–β‚Š β€’ p.comp f := ext fun _ => by rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm, smul_eq_mul, comp_apply] #align seminorm.comp_smul Seminorm.comp_smul theorem comp_smul_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) (x : E) : p.comp (c β€’ f) x = β€–cβ€– * p (f x) := map_smul_eq_mul p _ _ #align seminorm.comp_smul_apply Seminorm.comp_smul_apply end SeminormedCommRing section NormedField variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] {p q : Seminorm π•œ E} {x : E} /-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/ theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) := ⟨0, by rintro _ ⟨x, rfl⟩ dsimp; positivity⟩ #align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add noncomputable instance instInf : Inf (Seminorm π•œ E) where inf p q := { p.toAddGroupSeminorm βŠ“ q.toAddGroupSeminorm with toFun := fun x => β¨… u : E, p u + q (x - u) smul' := by intro a x obtain rfl | ha := eq_or_ne a 0 Β· rw [norm_zero, zero_mul, zero_smul] refine' ciInf_eq_of_forall_ge_of_forall_gt_exists_lt -- Porting note: the following was previously `fun i => by positivity` (fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _)) fun x hx => ⟨0, by rwa [map_zero, sub_zero, map_zero, add_zero]⟩ simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, ← map_smul_eq_mul p, ← map_smul_eq_mul q, smul_sub] refine' Function.Surjective.iInf_congr ((a⁻¹ β€’ Β·) : E β†’ E) (fun u => ⟨a β€’ u, inv_smul_smulβ‚€ ha u⟩) fun u => _ rw [smul_inv_smulβ‚€ ha] } @[simp] theorem inf_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ“ q) x = β¨… u : E, p u + q (x - u) := rfl #align seminorm.inf_apply Seminorm.inf_apply noncomputable instance instLattice : Lattice (Seminorm π•œ E) := { Seminorm.instSemilatticeSup with inf := (Β· βŠ“ Β·) inf_le_left := fun p q x => ciInf_le_of_le bddBelow_range_add x <| by simp only [sub_self, map_zero, add_zero]; rfl inf_le_right := fun p q x => ciInf_le_of_le bddBelow_range_add 0 <| by simp only [sub_self, map_zero, zero_add, sub_zero]; rfl le_inf := fun a b c hab hac x => le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) } theorem smul_inf [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ“ q) = r β€’ p βŠ“ r β€’ q := by ext simp_rw [smul_apply, inf_apply, smul_apply, ← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add] #align seminorm.smul_inf Seminorm.smul_inf section Classical open Classical /-- We define the supremum of an arbitrary subset of `Seminorm π•œ E` as follows: * if `s` is `BddAbove` *as a set of functions `E β†’ ℝ`* (that is, if `s` is pointwise bounded above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a seminorm. * otherwise, we take the zero seminorm `βŠ₯`. There are two things worth mentioning here: * First, it is not trivial at first that `s` being bounded above *by a function* implies being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make the case disjunction on `BddAbove ((↑) '' s : Set (E β†’ ℝ))` and not `BddAbove s`. * Since the pointwise `Sup` already gives `0` at points where a family of functions is not bounded above, one could hope that just using the pointwise `Sup` would work here, without the need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can give a function which does *not* satisfy the seminorm axioms (typically sub-additivity). -/ noncomputable instance instSupSet : SupSet (Seminorm π•œ E) where sSup s := if h : BddAbove ((↑) '' s : Set (E β†’ ℝ)) then { toFun := ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) map_zero' := by rw [iSup_apply, ← @Real.ciSup_const_zero s] congr! rename_i _ _ _ i exact map_zero i.1 add_le' := fun x y => by rcases h with ⟨q, hq⟩ obtain rfl | h := s.eq_empty_or_nonempty Β· simp [Real.ciSup_empty] haveI : Nonempty ↑s := h.coe_sort simp only [iSup_apply] refine' ciSup_le fun i => ((i : Seminorm π•œ E).add_le' x y).trans <| add_le_add -- Porting note: `f` is provided to force `Subtype.val` to appear. -- A type ascription on `_` would have also worked, but would have been more verbose. (le_ciSup (f := fun i => (Subtype.val i : Seminorm π•œ E).toFun x) ⟨q x, _⟩ i) (le_ciSup (f := fun i => (Subtype.val i : Seminorm π•œ E).toFun y) ⟨q y, _⟩ i) <;> rw [mem_upperBounds, forall_range_iff] <;> exact fun j => hq (mem_image_of_mem _ j.2) _ neg' := fun x => by simp only [iSup_apply] congr! 2 rename_i _ _ _ i exact i.1.neg' _ smul' := fun a x => by simp only [iSup_apply] rw [← smul_eq_mul, Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π•œ E) x] congr! rename_i _ _ _ i exact i.1.smul' a x } else βŠ₯ protected theorem coe_sSup_eq' {s : Set <| Seminorm π•œ E} (hs : BddAbove ((↑) '' s : Set (E β†’ ℝ))) : ↑(sSup s) = ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) := congr_arg _ (dif_pos hs) #align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq' protected theorem bddAbove_iff {s : Set <| Seminorm π•œ E} : BddAbove s ↔ BddAbove ((↑) '' s : Set (E β†’ ℝ)) := ⟨fun ⟨q, hq⟩ => ⟨q, ball_image_of_ball fun p hp => hq hp⟩, fun H => ⟨sSup s, fun p hp x => by dsimp rw [Seminorm.coe_sSup_eq' H, iSup_apply] rcases H with ⟨q, hq⟩ exact le_ciSup ⟨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) x⟩ ⟨p, hp⟩⟩⟩ #align seminorm.bdd_above_iff Seminorm.bddAbove_iff protected theorem bddAbove_range_iff {p : ΞΉ β†’ Seminorm π•œ E} : BddAbove (range p) ↔ βˆ€ x, BddAbove (range fun i ↦ p i x) := by rw [Seminorm.bddAbove_iff, ← range_comp, bddAbove_range_pi]; rfl protected theorem coe_sSup_eq {s : Set <| Seminorm π•œ E} (hs : BddAbove s) : ↑(sSup s) = ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) := Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs) #align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β†’ Seminorm π•œ E} (hp : BddAbove (range p)) : ↑(⨆ i, p i) = ⨆ i, ((p i : Seminorm π•œ E) : E β†’ ℝ) := by rw [← sSup_range, Seminorm.coe_sSup_eq hp] exact iSup_range' (fun p : Seminorm π•œ E => (p : E β†’ ℝ)) p #align seminorm.coe_supr_eq Seminorm.coe_iSup_eq protected theorem sSup_apply {s : Set (Seminorm π•œ E)} (hp : BddAbove s) {x : E} : (sSup s) x = ⨆ p : s, (p : E β†’ ℝ) x := by rw [Seminorm.coe_sSup_eq hp, iSup_apply] protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β†’ Seminorm π•œ E} (hp : BddAbove (range p)) {x : E} : (⨆ i, p i) x = ⨆ i, p i x := by rw [Seminorm.coe_iSup_eq hp, iSup_apply] protected theorem sSup_empty : sSup (βˆ… : Set (Seminorm π•œ E)) = βŠ₯ := by ext rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty] rfl private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π•œ E)) (hs₁ : BddAbove s) (hsβ‚‚ : s.Nonempty) : IsLUB s (sSup s) := by refine' ⟨fun p hp x => _, fun p hp x => _⟩ <;> haveI : Nonempty ↑s := hsβ‚‚.coe_sort <;> dsimp <;> rw [Seminorm.coe_sSup_eq hs₁, iSup_apply] Β· rcases hs₁ with ⟨q, hq⟩ exact le_ciSup ⟨q x, forall_range_iff.mpr fun i : s => hq i.2 x⟩ ⟨p, hp⟩ Β· exact ciSup_le fun q => hp q.2 x /-- `Seminorm π•œ E` is a conditionally complete lattice. Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you need to use `sInf` on seminorms, then you should probably provide a more workable definition first, but this is unlikely to happen so we keep the "bad" definition for now. -/ noncomputable instance instConditionallyCompleteLattice : ConditionallyCompleteLattice (Seminorm π•œ E) := conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π•œ E) Seminorm.isLUB_sSup end Classical end NormedField /-! ### Seminorm ball -/ section SeminormedRing variable [SeminormedRing π•œ] section AddCommGroup variable [AddCommGroup E] section SMul variable [SMul π•œ E] (p : Seminorm π•œ E) /-- The ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y` with `p (y - x) < r`. -/ def ball (x : E) (r : ℝ) := { y : E | p (y - x) < r } #align seminorm.ball Seminorm.ball /-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y` with `p (y - x) ≀ r`. -/ def closedBall (x : E) (r : ℝ) := { y : E | p (y - x) ≀ r } #align seminorm.closed_ball Seminorm.closedBall variable {x y : E} {r : ℝ} @[simp] theorem mem_ball : y ∈ ball p x r ↔ p (y - x) < r := Iff.rfl #align seminorm.mem_ball Seminorm.mem_ball @[simp] theorem mem_closedBall : y ∈ closedBall p x r ↔ p (y - x) ≀ r := Iff.rfl #align seminorm.mem_closed_ball Seminorm.mem_closedBall theorem mem_ball_self (hr : 0 < r) : x ∈ ball p x r := by simp [hr] #align seminorm.mem_ball_self Seminorm.mem_ball_self theorem mem_closedBall_self (hr : 0 ≀ r) : x ∈ closedBall p x r := by simp [hr] #align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self theorem mem_ball_zero : y ∈ ball p 0 r ↔ p y < r := by rw [mem_ball, sub_zero] #align seminorm.mem_ball_zero Seminorm.mem_ball_zero theorem mem_closedBall_zero : y ∈ closedBall p 0 r ↔ p y ≀ r := by rw [mem_closedBall, sub_zero] #align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } := Set.ext fun _ => p.mem_ball_zero #align seminorm.ball_zero_eq Seminorm.ball_zero_eq theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y ≀ r } := Set.ext fun _ => p.mem_closedBall_zero #align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq theorem ball_subset_closedBall (x r) : ball p x r βŠ† closedBall p x r := fun _ h => (mem_closedBall _).mpr ((mem_ball _).mp h).le #align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β‹‚ ρ > r, ball p x ρ := by ext y; simp_rw [mem_closedBall, mem_iInterβ‚‚, mem_ball, ← forall_lt_iff_le'] #align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball @[simp] theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π•œ E) x r = Set.univ := by rw [Set.eq_univ_iff_forall, ball] simp [hr] #align seminorm.ball_zero' Seminorm.ball_zero' @[simp] theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π•œ E) x r = Set.univ := eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr) #align seminorm.closed_ball_zero' Seminorm.closedBall_zero' theorem ball_smul (p : Seminorm π•œ E) {c : NNReal} (hc : 0 < c) (r : ℝ) (x : E) : (c β€’ p).ball x r = p.ball x (r / c) := by ext rw [mem_ball, mem_ball, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm, lt_div_iff (NNReal.coe_pos.mpr hc)] #align seminorm.ball_smul Seminorm.ball_smul theorem closedBall_smul (p : Seminorm π•œ E) {c : NNReal} (hc : 0 < c) (r : ℝ) (x : E) : (c β€’ p).closedBall x r = p.closedBall x (r / c) := by ext rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm, le_div_iff (NNReal.coe_pos.mpr hc)] #align seminorm.closed_ball_smul Seminorm.closedBall_smul theorem ball_sup (p : Seminorm π•œ E) (q : Seminorm π•œ E) (e : E) (r : ℝ) : ball (p βŠ” q) e r = ball p e r ∩ ball q e r := by simp_rw [ball, ← Set.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff] #align seminorm.ball_sup Seminorm.ball_sup theorem closedBall_sup (p : Seminorm π•œ E) (q : Seminorm π•œ E) (e : E) (r : ℝ) : closedBall (p βŠ” q) e r = closedBall p e r ∩ closedBall q e r := by simp_rw [closedBall, ← Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff] #align seminorm.closed_ball_sup Seminorm.closedBall_sup theorem ball_finset_sup' (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : ℝ) : ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by
induction' H using Finset.Nonempty.cons_induction with a a s ha hs ih
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
Mathlib.Analysis.Seminorm.759_0.ywwMCgoKeIFKDZ3
theorem ball_finset_sup' (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : ℝ) : ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r
Mathlib_Analysis_Seminorm
case hβ‚€ R : Type u_1 R' : Type u_2 π•œ : Type u_3 π•œβ‚‚ : Type u_4 π•œβ‚ƒ : Type u_5 𝕝 : Type u_6 E : Type u_7 Eβ‚‚ : Type u_8 E₃ : Type u_9 F : Type u_10 G : Type u_11 ΞΉ : Type u_12 inst✝² : SeminormedRing π•œ inst✝¹ : AddCommGroup E inst✝ : SMul π•œ E p✝ : Seminorm π•œ E x y : E r✝ : ℝ p : ΞΉ β†’ Seminorm π•œ E s : Finset ΞΉ e : E r : ℝ a : ΞΉ ⊒ ball (Finset.sup' {a} (_ : Finset.Nonempty {a}) p) e r = Finset.inf' {a} (_ : Finset.Nonempty {a}) fun i => ball (p i) e r
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, YaΓ«l Dillies, Moritz Doll -/ import Mathlib.Data.Real.Pointwise import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.LocallyConvex.Basic import Mathlib.Analysis.Normed.Group.AddTorsor #align_import analysis.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c" /-! # Seminorms This file defines seminorms. A seminorm is a function to the reals which is positive-semidefinite, absolutely homogeneous, and subadditive. They are closely related to convex sets, and a topological vector space is locally convex if and only if its topology is induced by a family of seminorms. ## Main declarations For a module over a normed ring: * `Seminorm`: A function to the reals that is positive-semidefinite, absolutely homogeneous, and subadditive. * `normSeminorm π•œ E`: The norm on `E` as a seminorm. ## References * [H. H. Schaefer, *Topological Vector Spaces*][schaefer1966] ## Tags seminorm, locally convex, LCTVS -/ set_option autoImplicit true open NormedField Set Filter open scoped BigOperators NNReal Pointwise Topology Uniformity variable {R R' π•œ π•œβ‚‚ π•œβ‚ƒ 𝕝 E Eβ‚‚ E₃ F G ΞΉ : Type*} /-- A seminorm on a module over a normed ring is a function to the reals that is positive semidefinite, positive homogeneous, and subadditive. -/ structure Seminorm (π•œ : Type*) (E : Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminorm E where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ smul' : βˆ€ (a : π•œ) (x : E), toFun (a β€’ x) = β€–aβ€– * toFun x #align seminorm Seminorm attribute [nolint docBlame] Seminorm.toAddGroupSeminorm /-- `SeminormClass F π•œ E` states that `F` is a type of seminorms on the `π•œ`-module `E`. You should extend this class when you extend `Seminorm`. -/ class SeminormClass (F : Type*) (π•œ E : outParam <| Type*) [SeminormedRing π•œ] [AddGroup E] [SMul π•œ E] extends AddGroupSeminormClass F E ℝ where /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar and the original seminorm. -/ map_smul_eq_mul (f : F) (a : π•œ) (x : E) : f (a β€’ x) = β€–aβ€– * f x #align seminorm_class SeminormClass export SeminormClass (map_smul_eq_mul) -- Porting note: dangerous instances no longer exist -- attribute [nolint dangerousInstance] SeminormClass.toAddGroupSeminormClass section Of /-- Alternative constructor for a `Seminorm` on an `AddCommGroup E` that is a module over a `SeminormedRing π•œ`. -/ def Seminorm.of [SeminormedRing π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (add_le : βˆ€ x y : E, f (x + y) ≀ f x + f y) (smul : βˆ€ (a : π•œ) (x : E), f (a β€’ x) = β€–aβ€– * f x) : Seminorm π•œ E where toFun := f map_zero' := by rw [← zero_smul π•œ (0 : E), smul, norm_zero, zero_mul] add_le' := add_le smul' := smul neg' x := by rw [← neg_one_smul π•œ, smul, norm_neg, ← smul, one_smul] #align seminorm.of Seminorm.of /-- Alternative constructor for a `Seminorm` over a normed field `π•œ` that only assumes `f 0 = 0` and an inequality for the scalar multiplication. -/ def Seminorm.ofSMulLE [NormedField π•œ] [AddCommGroup E] [Module π•œ E] (f : E β†’ ℝ) (map_zero : f 0 = 0) (add_le : βˆ€ x y, f (x + y) ≀ f x + f y) (smul_le : βˆ€ (r : π•œ) (x), f (r β€’ x) ≀ β€–rβ€– * f x) : Seminorm π•œ E := Seminorm.of f add_le fun r x => by refine' le_antisymm (smul_le r x) _ by_cases h : r = 0 Β· simp [h, map_zero] rw [← mul_le_mul_left (inv_pos.mpr (norm_pos_iff.mpr h))] rw [inv_mul_cancel_leftβ‚€ (norm_ne_zero_iff.mpr h)] specialize smul_le r⁻¹ (r β€’ x) rw [norm_inv] at smul_le convert smul_le simp [h] #align seminorm.of_smul_le Seminorm.ofSMulLE end Of namespace Seminorm section SeminormedRing variable [SeminormedRing π•œ] section AddGroup variable [AddGroup E] section SMul variable [SMul π•œ E] instance instSeminormClass : SeminormClass (Seminorm π•œ E) π•œ E where coe f := f.toFun coe_injective' f g h := by rcases f with ⟨⟨_⟩⟩ rcases g with ⟨⟨_⟩⟩ congr map_zero f := f.map_zero' map_add_le_add f := f.add_le' map_neg_eq_map f := f.neg' map_smul_eq_mul f := f.smul' #align seminorm.seminorm_class Seminorm.instSeminormClass /-- Helper instance for when there's too many metavariables to apply `FunLike.hasCoeToFun`. -/ instance instCoeFun : CoeFun (Seminorm π•œ E) fun _ => E β†’ ℝ := FunLike.hasCoeToFun @[ext] theorem ext {p q : Seminorm π•œ E} (h : βˆ€ x, (p : E β†’ ℝ) x = q x) : p = q := FunLike.ext p q h #align seminorm.ext Seminorm.ext instance instZero : Zero (Seminorm π•œ E) := ⟨{ AddGroupSeminorm.instZeroAddGroupSeminorm.zero with smul' := fun _ _ => (mul_zero _).symm }⟩ @[simp] theorem coe_zero : ⇑(0 : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_zero Seminorm.coe_zero @[simp] theorem zero_apply (x : E) : (0 : Seminorm π•œ E) x = 0 := rfl #align seminorm.zero_apply Seminorm.zero_apply instance : Inhabited (Seminorm π•œ E) := ⟨0⟩ variable (p : Seminorm π•œ E) (c : π•œ) (x y : E) (r : ℝ) /-- Any action on `ℝ` which factors through `ℝβ‰₯0` applies to a seminorm. -/ instance instSMul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : SMul R (Seminorm π•œ E) where smul r p := { r β€’ p.toAddGroupSeminorm with toFun := fun x => r β€’ p x smul' := fun _ _ => by simp only [← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul] rw [map_smul_eq_mul, mul_left_comm] } instance [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] [SMul R' ℝ] [SMul R' ℝβ‰₯0] [IsScalarTower R' ℝβ‰₯0 ℝ] [SMul R R'] [IsScalarTower R R' ℝ] : IsScalarTower R R' (Seminorm π•œ E) where smul_assoc r a p := ext fun x => smul_assoc r a (p x) theorem coe_smul [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) : ⇑(r β€’ p) = r β€’ ⇑p := rfl #align seminorm.coe_smul Seminorm.coe_smul @[simp] theorem smul_apply [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p : Seminorm π•œ E) (x : E) : (r β€’ p) x = r β€’ p x := rfl #align seminorm.smul_apply Seminorm.smul_apply instance instAdd : Add (Seminorm π•œ E) where add p q := { p.toAddGroupSeminorm + q.toAddGroupSeminorm with toFun := fun x => p x + q x smul' := fun a x => by simp only [map_smul_eq_mul, map_smul_eq_mul, mul_add] } theorem coe_add (p q : Seminorm π•œ E) : ⇑(p + q) = p + q := rfl #align seminorm.coe_add Seminorm.coe_add @[simp] theorem add_apply (p q : Seminorm π•œ E) (x : E) : (p + q) x = p x + q x := rfl #align seminorm.add_apply Seminorm.add_apply instance instAddMonoid : AddMonoid (Seminorm π•œ E) := FunLike.coe_injective.addMonoid _ rfl coe_add fun _ _ => by rfl instance instOrderedCancelAddCommMonoid : OrderedCancelAddCommMonoid (Seminorm π•œ E) := FunLike.coe_injective.orderedCancelAddCommMonoid _ rfl coe_add fun _ _ => rfl instance instMulAction [Monoid R] [MulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : MulAction R (Seminorm π•œ E) := FunLike.coe_injective.mulAction _ (by intros; rfl) variable (π•œ E) /-- `coeFn` as an `AddMonoidHom`. Helper definition for showing that `Seminorm π•œ E` is a module. -/ @[simps] def coeFnAddMonoidHom : AddMonoidHom (Seminorm π•œ E) (E β†’ ℝ) where toFun := (↑) map_zero' := coe_zero map_add' := coe_add #align seminorm.coe_fn_add_monoid_hom Seminorm.coeFnAddMonoidHom theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom π•œ E) := show @Function.Injective (Seminorm π•œ E) (E β†’ ℝ) (↑) from FunLike.coe_injective #align seminorm.coe_fn_add_monoid_hom_injective Seminorm.coeFnAddMonoidHom_injective variable {π•œ E} instance instDistribMulAction [Monoid R] [DistribMulAction R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : DistribMulAction R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).distribMulAction _ (by intros; rfl) instance instModule [Semiring R] [Module R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] : Module R (Seminorm π•œ E) := (coeFnAddMonoidHom_injective π•œ E).module R _ (by intros; rfl) instance instSup : Sup (Seminorm π•œ E) where sup p q := { p.toAddGroupSeminorm βŠ” q.toAddGroupSeminorm with toFun := p βŠ” q smul' := fun x v => (congr_argβ‚‚ max (map_smul_eq_mul p x v) (map_smul_eq_mul q x v)).trans <| (mul_max_of_nonneg _ _ <| norm_nonneg x).symm } @[simp] theorem coe_sup (p q : Seminorm π•œ E) : ⇑(p βŠ” q) = (p : E β†’ ℝ) βŠ” (q : E β†’ ℝ) := rfl #align seminorm.coe_sup Seminorm.coe_sup theorem sup_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ” q) x = p x βŠ” q x := rfl #align seminorm.sup_apply Seminorm.sup_apply theorem smul_sup [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ” q) = r β€’ p βŠ” r β€’ q := have real.smul_max : βˆ€ x y : ℝ, r β€’ max x y = max (r β€’ x) (r β€’ y) := fun x y => by simpa only [← smul_eq_mul, ← NNReal.smul_def, smul_one_smul ℝβ‰₯0 r (_ : ℝ)] using mul_max_of_nonneg x y (r β€’ (1 : ℝβ‰₯0) : ℝβ‰₯0).coe_nonneg ext fun x => real.smul_max _ _ #align seminorm.smul_sup Seminorm.smul_sup instance instPartialOrder : PartialOrder (Seminorm π•œ E) := PartialOrder.lift _ FunLike.coe_injective @[simp, norm_cast] theorem coe_le_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) ≀ q ↔ p ≀ q := Iff.rfl #align seminorm.coe_le_coe Seminorm.coe_le_coe @[simp, norm_cast] theorem coe_lt_coe {p q : Seminorm π•œ E} : (p : E β†’ ℝ) < q ↔ p < q := Iff.rfl #align seminorm.coe_lt_coe Seminorm.coe_lt_coe theorem le_def {p q : Seminorm π•œ E} : p ≀ q ↔ βˆ€ x, p x ≀ q x := Iff.rfl #align seminorm.le_def Seminorm.le_def theorem lt_def {p q : Seminorm π•œ E} : p < q ↔ p ≀ q ∧ βˆƒ x, p x < q x := @Pi.lt_def _ _ _ p q #align seminorm.lt_def Seminorm.lt_def instance instSemilatticeSup : SemilatticeSup (Seminorm π•œ E) := Function.Injective.semilatticeSup _ FunLike.coe_injective coe_sup end SMul end AddGroup section Module variable [SeminormedRing π•œβ‚‚] [SeminormedRing π•œβ‚ƒ] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable {σ₂₃ : π•œβ‚‚ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₂₃] variable {σ₁₃ : π•œ β†’+* π•œβ‚ƒ} [RingHomIsometric σ₁₃] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [AddCommGroup E₃] variable [AddCommGroup F] [AddCommGroup G] variable [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] [Module π•œβ‚ƒ E₃] [Module π•œ F] [Module π•œ G] -- Porting note: even though this instance is found immediately by typeclass search, -- it seems to be needed below!? noncomputable instance smul_nnreal_real : SMul ℝβ‰₯0 ℝ := inferInstance variable [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] /-- Composition of a seminorm with a linear map is a seminorm. -/ def comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œ E := { p.toAddGroupSeminorm.comp f.toAddMonoidHom with toFun := fun x => p (f x) -- Porting note: the `simp only` below used to be part of the `rw`. -- I'm not sure why this change was needed, and am worried by it! smul' := fun _ _ => by simp only [map_smulβ‚›β‚—]; rw [map_smul_eq_mul, RingHomIsometric.is_iso] } #align seminorm.comp Seminorm.comp theorem coe_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : ⇑(p.comp f) = p ∘ f := rfl #align seminorm.coe_comp Seminorm.coe_comp @[simp] theorem comp_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (x : E) : (p.comp f) x = p (f x) := rfl #align seminorm.comp_apply Seminorm.comp_apply @[simp] theorem comp_id (p : Seminorm π•œ E) : p.comp LinearMap.id = p := ext fun _ => rfl #align seminorm.comp_id Seminorm.comp_id @[simp] theorem comp_zero (p : Seminorm π•œβ‚‚ Eβ‚‚) : p.comp (0 : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) = 0 := ext fun _ => map_zero p #align seminorm.comp_zero Seminorm.comp_zero @[simp] theorem zero_comp (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (0 : Seminorm π•œβ‚‚ Eβ‚‚).comp f = 0 := ext fun _ => rfl #align seminorm.zero_comp Seminorm.zero_comp theorem comp_comp [RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] (p : Seminorm π•œβ‚ƒ E₃) (g : Eβ‚‚ β†’β‚›β‚—[σ₂₃] E₃) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (g.comp f) = (p.comp g).comp f := ext fun _ => rfl #align seminorm.comp_comp Seminorm.comp_comp theorem add_comp (p q : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : (p + q).comp f = p.comp f + q.comp f := ext fun _ => rfl #align seminorm.add_comp Seminorm.add_comp theorem comp_add_le (p : Seminorm π•œβ‚‚ Eβ‚‚) (f g : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : p.comp (f + g) ≀ p.comp f + p.comp g := fun _ => map_add_le_add p _ _ #align seminorm.comp_add_le Seminorm.comp_add_le theorem smul_comp (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : R) : (c β€’ p).comp f = c β€’ p.comp f := ext fun _ => rfl #align seminorm.smul_comp Seminorm.smul_comp theorem comp_mono {p q : Seminorm π•œβ‚‚ Eβ‚‚} (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (hp : p ≀ q) : p.comp f ≀ q.comp f := fun _ => hp _ #align seminorm.comp_mono Seminorm.comp_mono /-- The composition as an `AddMonoidHom`. -/ @[simps] def pullback (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) : Seminorm π•œβ‚‚ Eβ‚‚ β†’+ Seminorm π•œ E where toFun := fun p => p.comp f map_zero' := zero_comp f map_add' := fun p q => add_comp p q f #align seminorm.pullback Seminorm.pullback instance instOrderBot : OrderBot (Seminorm π•œ E) where bot := 0 bot_le := map_nonneg @[simp] theorem coe_bot : ⇑(βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.coe_bot Seminorm.coe_bot theorem bot_eq_zero : (βŠ₯ : Seminorm π•œ E) = 0 := rfl #align seminorm.bot_eq_zero Seminorm.bot_eq_zero theorem smul_le_smul {p q : Seminorm π•œ E} {a b : ℝβ‰₯0} (hpq : p ≀ q) (hab : a ≀ b) : a β€’ p ≀ b β€’ q := by simp_rw [le_def] intro x exact mul_le_mul hab (hpq x) (map_nonneg p x) (NNReal.coe_nonneg b) #align seminorm.smul_le_smul Seminorm.smul_le_smul theorem finset_sup_apply (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = ↑(s.sup fun i => ⟨p i x, map_nonneg (p i) x⟩ : ℝβ‰₯0) := by induction' s using Finset.cons_induction_on with a s ha ih Β· rw [Finset.sup_empty, Finset.sup_empty, coe_bot, _root_.bot_eq_zero, Pi.zero_apply] norm_cast Β· rw [Finset.sup_cons, Finset.sup_cons, coe_sup, sup_eq_max, Pi.sup_apply, sup_eq_max, NNReal.coe_max, NNReal.coe_mk, ih] #align seminorm.finset_sup_apply Seminorm.finset_sup_apply theorem exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) {s : Finset ΞΉ} (hs : s.Nonempty) (x : E) : βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.exists_mem_eq_sup s hs (fun i ↦ (⟨p i x, map_nonneg _ _⟩ : ℝβ‰₯0)) with ⟨i, hi, hix⟩ rw [finset_sup_apply] exact ⟨i, hi, congr_arg _ hix⟩ theorem zero_or_exists_apply_eq_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x : E) : s.sup p x = 0 ∨ βˆƒ i ∈ s, s.sup p x = p i x := by rcases Finset.eq_empty_or_nonempty s with (rfl|hs) Β· left; rfl Β· right; exact exists_apply_eq_finset_sup p hs x theorem finset_sup_smul (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (C : ℝβ‰₯0) : s.sup (C β€’ p) = C β€’ s.sup p := by ext x rw [smul_apply, finset_sup_apply, finset_sup_apply] symm exact congr_arg ((↑) : ℝβ‰₯0 β†’ ℝ) (NNReal.mul_finset_sup C s (fun i ↦ ⟨p i x, map_nonneg _ _⟩)) theorem finset_sup_le_sum (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) : s.sup p ≀ βˆ‘ i in s, p i := by classical refine' Finset.sup_le_iff.mpr _ intro i hi rw [Finset.sum_eq_sum_diff_singleton_add hi, le_add_iff_nonneg_left] exact bot_le #align seminorm.finset_sup_le_sum Seminorm.finset_sup_le_sum theorem finset_sup_apply_le {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 ≀ a) (h : βˆ€ i, i ∈ s β†’ p i x ≀ a) : s.sup p x ≀ a := by lift a to ℝβ‰₯0 using ha rw [finset_sup_apply, NNReal.coe_le_coe] exact Finset.sup_le h #align seminorm.finset_sup_apply_le Seminorm.finset_sup_apply_le theorem le_finset_sup_apply {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {i : ΞΉ} (hi : i ∈ s) : p i x ≀ s.sup p x := (Finset.le_sup hi : p i ≀ s.sup p) x theorem finset_sup_apply_lt {p : ΞΉ β†’ Seminorm π•œ E} {s : Finset ΞΉ} {x : E} {a : ℝ} (ha : 0 < a) (h : βˆ€ i, i ∈ s β†’ p i x < a) : s.sup p x < a := by lift a to ℝβ‰₯0 using ha.le rw [finset_sup_apply, NNReal.coe_lt_coe, Finset.sup_lt_iff] Β· exact h Β· exact NNReal.coe_pos.mpr ha #align seminorm.finset_sup_apply_lt Seminorm.finset_sup_apply_lt theorem norm_sub_map_le_sub (p : Seminorm π•œ E) (x y : E) : β€–p x - p yβ€– ≀ p (x - y) := abs_sub_map_le_sub p x y #align seminorm.norm_sub_map_le_sub Seminorm.norm_sub_map_le_sub end Module end SeminormedRing section SeminormedCommRing variable [SeminormedRing π•œ] [SeminormedCommRing π•œβ‚‚] variable {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] variable [AddCommGroup E] [AddCommGroup Eβ‚‚] [Module π•œ E] [Module π•œβ‚‚ Eβ‚‚] theorem comp_smul (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) : p.comp (c β€’ f) = β€–cβ€–β‚Š β€’ p.comp f := ext fun _ => by rw [comp_apply, smul_apply, LinearMap.smul_apply, map_smul_eq_mul, NNReal.smul_def, coe_nnnorm, smul_eq_mul, comp_apply] #align seminorm.comp_smul Seminorm.comp_smul theorem comp_smul_apply (p : Seminorm π•œβ‚‚ Eβ‚‚) (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (c : π•œβ‚‚) (x : E) : p.comp (c β€’ f) x = β€–cβ€– * p (f x) := map_smul_eq_mul p _ _ #align seminorm.comp_smul_apply Seminorm.comp_smul_apply end SeminormedCommRing section NormedField variable [NormedField π•œ] [AddCommGroup E] [Module π•œ E] {p q : Seminorm π•œ E} {x : E} /-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/ theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u)) := ⟨0, by rintro _ ⟨x, rfl⟩ dsimp; positivity⟩ #align seminorm.bdd_below_range_add Seminorm.bddBelow_range_add noncomputable instance instInf : Inf (Seminorm π•œ E) where inf p q := { p.toAddGroupSeminorm βŠ“ q.toAddGroupSeminorm with toFun := fun x => β¨… u : E, p u + q (x - u) smul' := by intro a x obtain rfl | ha := eq_or_ne a 0 Β· rw [norm_zero, zero_mul, zero_smul] refine' ciInf_eq_of_forall_ge_of_forall_gt_exists_lt -- Porting note: the following was previously `fun i => by positivity` (fun i => add_nonneg (map_nonneg _ _) (map_nonneg _ _)) fun x hx => ⟨0, by rwa [map_zero, sub_zero, map_zero, add_zero]⟩ simp_rw [Real.mul_iInf_of_nonneg (norm_nonneg a), mul_add, ← map_smul_eq_mul p, ← map_smul_eq_mul q, smul_sub] refine' Function.Surjective.iInf_congr ((a⁻¹ β€’ Β·) : E β†’ E) (fun u => ⟨a β€’ u, inv_smul_smulβ‚€ ha u⟩) fun u => _ rw [smul_inv_smulβ‚€ ha] } @[simp] theorem inf_apply (p q : Seminorm π•œ E) (x : E) : (p βŠ“ q) x = β¨… u : E, p u + q (x - u) := rfl #align seminorm.inf_apply Seminorm.inf_apply noncomputable instance instLattice : Lattice (Seminorm π•œ E) := { Seminorm.instSemilatticeSup with inf := (Β· βŠ“ Β·) inf_le_left := fun p q x => ciInf_le_of_le bddBelow_range_add x <| by simp only [sub_self, map_zero, add_zero]; rfl inf_le_right := fun p q x => ciInf_le_of_le bddBelow_range_add 0 <| by simp only [sub_self, map_zero, zero_add, sub_zero]; rfl le_inf := fun a b c hab hac x => le_ciInf fun u => (le_map_add_map_sub a _ _).trans <| add_le_add (hab _) (hac _) } theorem smul_inf [SMul R ℝ] [SMul R ℝβ‰₯0] [IsScalarTower R ℝβ‰₯0 ℝ] (r : R) (p q : Seminorm π•œ E) : r β€’ (p βŠ“ q) = r β€’ p βŠ“ r β€’ q := by ext simp_rw [smul_apply, inf_apply, smul_apply, ← smul_one_smul ℝβ‰₯0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, Real.mul_iInf_of_nonneg (NNReal.coe_nonneg _), mul_add] #align seminorm.smul_inf Seminorm.smul_inf section Classical open Classical /-- We define the supremum of an arbitrary subset of `Seminorm π•œ E` as follows: * if `s` is `BddAbove` *as a set of functions `E β†’ ℝ`* (that is, if `s` is pointwise bounded above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a seminorm. * otherwise, we take the zero seminorm `βŠ₯`. There are two things worth mentioning here: * First, it is not trivial at first that `s` being bounded above *by a function* implies being bounded above *as a seminorm*. We show this in `Seminorm.bddAbove_iff` by using that the `Sup s` as defined here is then a bounding seminorm for `s`. So it is important to make the case disjunction on `BddAbove ((↑) '' s : Set (E β†’ ℝ))` and not `BddAbove s`. * Since the pointwise `Sup` already gives `0` at points where a family of functions is not bounded above, one could hope that just using the pointwise `Sup` would work here, without the need for an additional case disjunction. As discussed on Zulip, this doesn't work because this can give a function which does *not* satisfy the seminorm axioms (typically sub-additivity). -/ noncomputable instance instSupSet : SupSet (Seminorm π•œ E) where sSup s := if h : BddAbove ((↑) '' s : Set (E β†’ ℝ)) then { toFun := ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) map_zero' := by rw [iSup_apply, ← @Real.ciSup_const_zero s] congr! rename_i _ _ _ i exact map_zero i.1 add_le' := fun x y => by rcases h with ⟨q, hq⟩ obtain rfl | h := s.eq_empty_or_nonempty Β· simp [Real.ciSup_empty] haveI : Nonempty ↑s := h.coe_sort simp only [iSup_apply] refine' ciSup_le fun i => ((i : Seminorm π•œ E).add_le' x y).trans <| add_le_add -- Porting note: `f` is provided to force `Subtype.val` to appear. -- A type ascription on `_` would have also worked, but would have been more verbose. (le_ciSup (f := fun i => (Subtype.val i : Seminorm π•œ E).toFun x) ⟨q x, _⟩ i) (le_ciSup (f := fun i => (Subtype.val i : Seminorm π•œ E).toFun y) ⟨q y, _⟩ i) <;> rw [mem_upperBounds, forall_range_iff] <;> exact fun j => hq (mem_image_of_mem _ j.2) _ neg' := fun x => by simp only [iSup_apply] congr! 2 rename_i _ _ _ i exact i.1.neg' _ smul' := fun a x => by simp only [iSup_apply] rw [← smul_eq_mul, Real.smul_iSup_of_nonneg (norm_nonneg a) fun i : s => (i : Seminorm π•œ E) x] congr! rename_i _ _ _ i exact i.1.smul' a x } else βŠ₯ protected theorem coe_sSup_eq' {s : Set <| Seminorm π•œ E} (hs : BddAbove ((↑) '' s : Set (E β†’ ℝ))) : ↑(sSup s) = ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) := congr_arg _ (dif_pos hs) #align seminorm.coe_Sup_eq' Seminorm.coe_sSup_eq' protected theorem bddAbove_iff {s : Set <| Seminorm π•œ E} : BddAbove s ↔ BddAbove ((↑) '' s : Set (E β†’ ℝ)) := ⟨fun ⟨q, hq⟩ => ⟨q, ball_image_of_ball fun p hp => hq hp⟩, fun H => ⟨sSup s, fun p hp x => by dsimp rw [Seminorm.coe_sSup_eq' H, iSup_apply] rcases H with ⟨q, hq⟩ exact le_ciSup ⟨q x, forall_range_iff.mpr fun i : s => hq (mem_image_of_mem _ i.2) x⟩ ⟨p, hp⟩⟩⟩ #align seminorm.bdd_above_iff Seminorm.bddAbove_iff protected theorem bddAbove_range_iff {p : ΞΉ β†’ Seminorm π•œ E} : BddAbove (range p) ↔ βˆ€ x, BddAbove (range fun i ↦ p i x) := by rw [Seminorm.bddAbove_iff, ← range_comp, bddAbove_range_pi]; rfl protected theorem coe_sSup_eq {s : Set <| Seminorm π•œ E} (hs : BddAbove s) : ↑(sSup s) = ⨆ p : s, ((p : Seminorm π•œ E) : E β†’ ℝ) := Seminorm.coe_sSup_eq' (Seminorm.bddAbove_iff.mp hs) #align seminorm.coe_Sup_eq Seminorm.coe_sSup_eq protected theorem coe_iSup_eq {ΞΉ : Type*} {p : ΞΉ β†’ Seminorm π•œ E} (hp : BddAbove (range p)) : ↑(⨆ i, p i) = ⨆ i, ((p i : Seminorm π•œ E) : E β†’ ℝ) := by rw [← sSup_range, Seminorm.coe_sSup_eq hp] exact iSup_range' (fun p : Seminorm π•œ E => (p : E β†’ ℝ)) p #align seminorm.coe_supr_eq Seminorm.coe_iSup_eq protected theorem sSup_apply {s : Set (Seminorm π•œ E)} (hp : BddAbove s) {x : E} : (sSup s) x = ⨆ p : s, (p : E β†’ ℝ) x := by rw [Seminorm.coe_sSup_eq hp, iSup_apply] protected theorem iSup_apply {ΞΉ : Type*} {p : ΞΉ β†’ Seminorm π•œ E} (hp : BddAbove (range p)) {x : E} : (⨆ i, p i) x = ⨆ i, p i x := by rw [Seminorm.coe_iSup_eq hp, iSup_apply] protected theorem sSup_empty : sSup (βˆ… : Set (Seminorm π•œ E)) = βŠ₯ := by ext rw [Seminorm.sSup_apply bddAbove_empty, Real.ciSup_empty] rfl private theorem Seminorm.isLUB_sSup (s : Set (Seminorm π•œ E)) (hs₁ : BddAbove s) (hsβ‚‚ : s.Nonempty) : IsLUB s (sSup s) := by refine' ⟨fun p hp x => _, fun p hp x => _⟩ <;> haveI : Nonempty ↑s := hsβ‚‚.coe_sort <;> dsimp <;> rw [Seminorm.coe_sSup_eq hs₁, iSup_apply] Β· rcases hs₁ with ⟨q, hq⟩ exact le_ciSup ⟨q x, forall_range_iff.mpr fun i : s => hq i.2 x⟩ ⟨p, hp⟩ Β· exact ciSup_le fun q => hp q.2 x /-- `Seminorm π•œ E` is a conditionally complete lattice. Note that, while `inf`, `sup` and `sSup` have good definitional properties (corresponding to the instances given here for `Inf`, `Sup` and `SupSet` respectively), `sInf s` is just defined as the supremum of the lower bounds of `s`, which is not really useful in practice. If you need to use `sInf` on seminorms, then you should probably provide a more workable definition first, but this is unlikely to happen so we keep the "bad" definition for now. -/ noncomputable instance instConditionallyCompleteLattice : ConditionallyCompleteLattice (Seminorm π•œ E) := conditionallyCompleteLatticeOfLatticeOfsSup (Seminorm π•œ E) Seminorm.isLUB_sSup end Classical end NormedField /-! ### Seminorm ball -/ section SeminormedRing variable [SeminormedRing π•œ] section AddCommGroup variable [AddCommGroup E] section SMul variable [SMul π•œ E] (p : Seminorm π•œ E) /-- The ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y` with `p (y - x) < r`. -/ def ball (x : E) (r : ℝ) := { y : E | p (y - x) < r } #align seminorm.ball Seminorm.ball /-- The closed ball of radius `r` at `x` with respect to seminorm `p` is the set of elements `y` with `p (y - x) ≀ r`. -/ def closedBall (x : E) (r : ℝ) := { y : E | p (y - x) ≀ r } #align seminorm.closed_ball Seminorm.closedBall variable {x y : E} {r : ℝ} @[simp] theorem mem_ball : y ∈ ball p x r ↔ p (y - x) < r := Iff.rfl #align seminorm.mem_ball Seminorm.mem_ball @[simp] theorem mem_closedBall : y ∈ closedBall p x r ↔ p (y - x) ≀ r := Iff.rfl #align seminorm.mem_closed_ball Seminorm.mem_closedBall theorem mem_ball_self (hr : 0 < r) : x ∈ ball p x r := by simp [hr] #align seminorm.mem_ball_self Seminorm.mem_ball_self theorem mem_closedBall_self (hr : 0 ≀ r) : x ∈ closedBall p x r := by simp [hr] #align seminorm.mem_closed_ball_self Seminorm.mem_closedBall_self theorem mem_ball_zero : y ∈ ball p 0 r ↔ p y < r := by rw [mem_ball, sub_zero] #align seminorm.mem_ball_zero Seminorm.mem_ball_zero theorem mem_closedBall_zero : y ∈ closedBall p 0 r ↔ p y ≀ r := by rw [mem_closedBall, sub_zero] #align seminorm.mem_closed_ball_zero Seminorm.mem_closedBall_zero theorem ball_zero_eq : ball p 0 r = { y : E | p y < r } := Set.ext fun _ => p.mem_ball_zero #align seminorm.ball_zero_eq Seminorm.ball_zero_eq theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y ≀ r } := Set.ext fun _ => p.mem_closedBall_zero #align seminorm.closed_ball_zero_eq Seminorm.closedBall_zero_eq theorem ball_subset_closedBall (x r) : ball p x r βŠ† closedBall p x r := fun _ h => (mem_closedBall _).mpr ((mem_ball _).mp h).le #align seminorm.ball_subset_closed_ball Seminorm.ball_subset_closedBall theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = β‹‚ ρ > r, ball p x ρ := by ext y; simp_rw [mem_closedBall, mem_iInterβ‚‚, mem_ball, ← forall_lt_iff_le'] #align seminorm.closed_ball_eq_bInter_ball Seminorm.closedBall_eq_biInter_ball @[simp] theorem ball_zero' (x : E) (hr : 0 < r) : ball (0 : Seminorm π•œ E) x r = Set.univ := by rw [Set.eq_univ_iff_forall, ball] simp [hr] #align seminorm.ball_zero' Seminorm.ball_zero' @[simp] theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm π•œ E) x r = Set.univ := eq_univ_of_subset (ball_subset_closedBall _ _ _) (ball_zero' x hr) #align seminorm.closed_ball_zero' Seminorm.closedBall_zero' theorem ball_smul (p : Seminorm π•œ E) {c : NNReal} (hc : 0 < c) (r : ℝ) (x : E) : (c β€’ p).ball x r = p.ball x (r / c) := by ext rw [mem_ball, mem_ball, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm, lt_div_iff (NNReal.coe_pos.mpr hc)] #align seminorm.ball_smul Seminorm.ball_smul theorem closedBall_smul (p : Seminorm π•œ E) {c : NNReal} (hc : 0 < c) (r : ℝ) (x : E) : (c β€’ p).closedBall x r = p.closedBall x (r / c) := by ext rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm, le_div_iff (NNReal.coe_pos.mpr hc)] #align seminorm.closed_ball_smul Seminorm.closedBall_smul theorem ball_sup (p : Seminorm π•œ E) (q : Seminorm π•œ E) (e : E) (r : ℝ) : ball (p βŠ” q) e r = ball p e r ∩ ball q e r := by simp_rw [ball, ← Set.setOf_and, coe_sup, Pi.sup_apply, sup_lt_iff] #align seminorm.ball_sup Seminorm.ball_sup theorem closedBall_sup (p : Seminorm π•œ E) (q : Seminorm π•œ E) (e : E) (r : ℝ) : closedBall (p βŠ” q) e r = closedBall p e r ∩ closedBall q e r := by simp_rw [closedBall, ← Set.setOf_and, coe_sup, Pi.sup_apply, sup_le_iff] #align seminorm.closed_ball_sup Seminorm.closedBall_sup theorem ball_finset_sup' (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : ℝ) : ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by induction' H using Finset.Nonempty.cons_induction with a a s ha hs ih Β·
classical simp
theorem ball_finset_sup' (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : ℝ) : ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r := by induction' H using Finset.Nonempty.cons_induction with a a s ha hs ih Β·
Mathlib.Analysis.Seminorm.759_0.ywwMCgoKeIFKDZ3
theorem ball_finset_sup' (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (H : s.Nonempty) (e : E) (r : ℝ) : ball (s.sup' H p) e r = s.inf' H fun i => ball (p i) e r
Mathlib_Analysis_Seminorm