Module docstring
{"# Scalar multiplication on ℝ≥0∞.
This file defines basic scalar actions on extended nonnegative reals, showing that
MulActions, DistribMulActions, Modules and Algebras restrict from ℝ≥0∞ to ℝ≥0.
"}
{"# Scalar multiplication on ℝ≥0∞.
This file defines basic scalar actions on extended nonnegative reals, showing that
MulActions, DistribMulActions, Modules and Algebras restrict from ℝ≥0∞ to ℝ≥0.
"}
ENNReal.instMulActionNNReal
instance
{M : Type*} [MulAction ℝ≥0∞ M] : MulAction ℝ≥0 M
/-- A `MulAction` over `ℝ≥0∞` restricts to a `MulAction` over `ℝ≥0`. -/
noncomputable instance {M : Type*} [MulAction ℝ≥0∞ M] : MulAction ℝ≥0 M :=
MulAction.compHom M ofNNRealHom.toMonoidHom
ENNReal.smul_def
theorem
{M : Type*} [MulAction ℝ≥0∞ M] (c : ℝ≥0) (x : M) : c • x = (c : ℝ≥0∞) • x
ENNReal.instIsScalarTowerNNReal
instance
{M N : Type*} [MulAction ℝ≥0∞ M] [MulAction ℝ≥0∞ N] [SMul M N] [IsScalarTower ℝ≥0∞ M N] : IsScalarTower ℝ≥0 M N
instance {M N : Type*} [MulAction ℝ≥0∞ M] [MulAction ℝ≥0∞ N] [SMul M N] [IsScalarTower ℝ≥0∞ M N] :
IsScalarTower ℝ≥0 M N where smul_assoc r := smul_assoc (r : ℝ≥0∞)
ENNReal.smulCommClass_left
instance
{M N : Type*} [MulAction ℝ≥0∞ N] [SMul M N] [SMulCommClass ℝ≥0∞ M N] : SMulCommClass ℝ≥0 M N
instance smulCommClass_left {M N : Type*} [MulAction ℝ≥0∞ N] [SMul M N] [SMulCommClass ℝ≥0∞ M N] :
SMulCommClass ℝ≥0 M N where smul_comm r := smul_comm (r : ℝ≥0∞)
ENNReal.smulCommClass_right
instance
{M N : Type*} [MulAction ℝ≥0∞ N] [SMul M N] [SMulCommClass M ℝ≥0∞ N] : SMulCommClass M ℝ≥0 N
instance smulCommClass_right {M N : Type*} [MulAction ℝ≥0∞ N] [SMul M N] [SMulCommClass M ℝ≥0∞ N] :
SMulCommClass M ℝ≥0 N where smul_comm m r := smul_comm m (r : ℝ≥0∞)
ENNReal.instDistribMulActionNNReal
instance
{M : Type*} [AddMonoid M] [DistribMulAction ℝ≥0∞ M] : DistribMulAction ℝ≥0 M
/-- A `DistribMulAction` over `ℝ≥0∞` restricts to a `DistribMulAction` over `ℝ≥0`. -/
noncomputable instance {M : Type*} [AddMonoid M] [DistribMulAction ℝ≥0∞ M] :
DistribMulAction ℝ≥0 M :=
DistribMulAction.compHom M ofNNRealHom.toMonoidHom
ENNReal.instModuleNNReal
instance
{M : Type*} [AddCommMonoid M] [Module ℝ≥0∞ M] : Module ℝ≥0 M
/-- A `Module` over `ℝ≥0∞` restricts to a `Module` over `ℝ≥0`. -/
noncomputable instance {M : Type*} [AddCommMonoid M] [Module ℝ≥0∞ M] : Module ℝ≥0 M :=
Module.compHom M ofNNRealHom
ENNReal.instAlgebraNNReal
instance
{A : Type*} [Semiring A] [Algebra ℝ≥0∞ A] : Algebra ℝ≥0 A
/-- An `Algebra` over `ℝ≥0∞` restricts to an `Algebra` over `ℝ≥0`. -/
noncomputable instance {A : Type*} [Semiring A] [Algebra ℝ≥0∞ A] : Algebra ℝ≥0 A where
smul := (· • ·)
commutes' r x := by simp [Algebra.commutes]
smul_def' r x := by simp [← Algebra.smul_def (r : ℝ≥0∞) x, smul_def]
algebraMap := (algebraMap ℝ≥0∞ A).comp (ofNNRealHom : ℝ≥0 →+* ℝ≥0∞)
ENNReal.coe_smul
theorem
{R} (r : R) (s : ℝ≥0) [SMul R ℝ≥0] [SMul R ℝ≥0∞] [IsScalarTower R ℝ≥0 ℝ≥0] [IsScalarTower R ℝ≥0 ℝ≥0∞] :
(↑(r • s) : ℝ≥0∞) = (r : R) • (s : ℝ≥0∞)
theorem coe_smul {R} (r : R) (s : ℝ≥0) [SMul R ℝ≥0] [SMul R ℝ≥0∞] [IsScalarTower R ℝ≥0 ℝ≥0]
[IsScalarTower R ℝ≥0 ℝ≥0∞] : (↑(r • s) : ℝ≥0∞) = (r : R) • (s : ℝ≥0∞) := by
rw [← smul_one_smul ℝ≥0 r (s : ℝ≥0∞), smul_def, smul_eq_mul, ← ENNReal.coe_mul, smul_mul_assoc,
one_mul]
ENNReal.smul_top
theorem
{R} [Zero R] [SMulWithZero R ℝ≥0∞] [IsScalarTower R ℝ≥0∞ ℝ≥0∞] [NoZeroSMulDivisors R ℝ≥0∞] [DecidableEq R] (c : R) :
c • ∞ = if c = 0 then 0 else ∞
theorem smul_top {R} [Zero R] [SMulWithZero R ℝ≥0∞] [IsScalarTower R ℝ≥0∞ ℝ≥0∞]
[NoZeroSMulDivisors R ℝ≥0∞] [DecidableEq R] (c : R) :
c • ∞ = if c = 0 then 0 else ∞ := by
rw [← smul_one_mul, mul_top']
simp_rw [smul_eq_zero, or_iff_left one_ne_zero]
ENNReal.nnreal_smul_lt_top
theorem
{x : ℝ≥0} {y : ℝ≥0∞} (hy : y < ⊤) : x • y < ⊤
lemma nnreal_smul_lt_top {x : ℝ≥0} {y : ℝ≥0∞} (hy : y < ⊤) : x • y < ⊤ := mul_lt_top (by simp) hy
ENNReal.nnreal_smul_ne_top
theorem
{x : ℝ≥0} {y : ℝ≥0∞} (hy : y ≠ ⊤) : x • y ≠ ⊤
lemma nnreal_smul_ne_top {x : ℝ≥0} {y : ℝ≥0∞} (hy : y ≠ ⊤) : x • y ≠ ⊤ := mul_ne_top (by simp) hy
ENNReal.nnreal_smul_ne_top_iff
theorem
{x : ℝ≥0} {y : ℝ≥0∞} (hx : x ≠ 0) : x • y ≠ ⊤ ↔ y ≠ ⊤
lemma nnreal_smul_ne_top_iff {x : ℝ≥0} {y : ℝ≥0∞} (hx : x ≠ 0) : x • y ≠ ⊤x • y ≠ ⊤ ↔ y ≠ ⊤ :=
⟨by rintro h rfl; simp [smul_top, hx] at h, nnreal_smul_ne_top⟩
ENNReal.nnreal_smul_lt_top_iff
theorem
{x : ℝ≥0} {y : ℝ≥0∞} (hx : x ≠ 0) : x • y < ⊤ ↔ y < ⊤
lemma nnreal_smul_lt_top_iff {x : ℝ≥0} {y : ℝ≥0∞} (hx : x ≠ 0) : x • y < ⊤ ↔ y < ⊤ := by
rw [lt_top_iff_ne_top, lt_top_iff_ne_top, nnreal_smul_ne_top_iff hx]
ENNReal.smul_toNNReal
theorem
(a : ℝ≥0) (b : ℝ≥0∞) : (a • b).toNNReal = a * b.toNNReal
@[simp]
theorem smul_toNNReal (a : ℝ≥0) (b : ℝ≥0∞) : (a • b).toNNReal = a * b.toNNReal := by
change ((a : ℝ≥0∞) * b).toNNReal = a * b.toNNReal
simp only [ENNReal.toNNReal_mul, ENNReal.toNNReal_coe]
ENNReal.toReal_smul
theorem
(r : ℝ≥0) (s : ℝ≥0∞) : (r • s).toReal = r • s.toReal
theorem toReal_smul (r : ℝ≥0) (s : ℝ≥0∞) : (r • s).toReal = r • s.toReal := by
rw [ENNReal.smul_def, smul_eq_mul, toReal_mul, coe_toReal]
rfl
ENNReal.instPosSMulStrictMonoNNReal
instance
: PosSMulStrictMono ℝ≥0 ℝ≥0∞
instance : PosSMulStrictMono ℝ≥0 ℝ≥0∞ where
elim _r hr _a _b hab := ENNReal.mul_lt_mul_left' (coe_pos.2 hr).ne' coe_ne_top hab
ENNReal.instSMulPosMonoNNReal
instance
: SMulPosMono ℝ≥0 ℝ≥0∞
instance : SMulPosMono ℝ≥0 ℝ≥0∞ where
elim _r _ _a _b hab := mul_le_mul_right' (coe_le_coe.2 hab) _