Documentation

Mathlib.Data.NNReal.Basic

Basic results on nonnegative real numbers #

This file contains all results on NNReal that do not directly follow from its basic structure. As a consequence, it is a bit of a random collection of results, and is a good target for cleanup.

Notation #

This file uses ℝ≥0 as a localized notation for NNReal.

@[implicit_reducible]
Equations
  • One or more equations did not get rendered due to their size.
@[simp]
theorem NNReal.coe_mulIndicator {α : Type u_2} (s : Set α) (f : α → NNReal) (a : α) :
↑(s.mulIndicator f a) = s.mulIndicator (fun (x : α) => ↑(f x)) a
@[simp]
theorem NNReal.coe_indicator {α : Type u_2} (s : Set α) (f : α → NNReal) (a : α) :
↑(s.indicator f a) = s.indicator (fun (x : α) => ↑(f x)) a
@[simp]
theorem NNReal.coe_mulSingle {α : Type u_2} [DecidableEq α] (a : α) (b : NNReal) (c : α) :
↑(Pi.mulSingle a b c) = Pi.mulSingle a (↑b) c
@[simp]
theorem NNReal.coe_single {α : Type u_2} [DecidableEq α] (a : α) (b : NNReal) (c : α) :
↑(Pi.single a b c) = Pi.single a (↑b) c
@[simp]
theorem NNReal.coe_sum {ι : Type u_2} (s : Finset ι) (f : ι → NNReal) :
↑(∑ i ∈ s, f i) = ∑ i ∈ s, ↑(f i)
@[simp]
theorem NNReal.toReal_finsuppSum {M : Type u_1} [Zero M] {ι : Type u_2} (f : ι →₀ M) (g : ι → M → NNReal) :
↑(f.sum g) = f.sum fun (i : ι) (m : M) => ↑(g i m)
@[simp]
theorem NNReal.toReal_finsuppProd {M : Type u_1} [Zero M] {ι : Type u_2} (f : ι →₀ M) (g : ι → M → NNReal) :
↑(f.prod g) = f.prod fun (i : ι) (m : M) => ↑(g i m)
@[simp]
theorem NNReal.coe_expect {ι : Type u_2} (s : Finset ι) (f : ι → NNReal) :
↑(s.expect fun (i : ι) => f i) = s.expect fun (i : ι) => ↑(f i)
theorem Real.toNNReal_sum_of_nonneg {ι : Type u_2} {s : Finset ι} {f : ι → ℝ} (hf : ∀ i ∈ s, 0 ≤ f i) :
(∑ a ∈ s, f a).toNNReal = ∑ a ∈ s, (f a).toNNReal
@[simp]
theorem NNReal.coe_prod {ι : Type u_2} (s : Finset ι) (f : ι → NNReal) :
↑(∏ a ∈ s, f a) = ∏ a ∈ s, ↑(f a)
theorem Real.toNNReal_prod_of_nonneg {ι : Type u_2} {s : Finset ι} {f : ι → ℝ} (hf : ∀ a ∈ s, 0 ≤ f a) :
(∏ a ∈ s, f a).toNNReal = ∏ a ∈ s, (f a).toNNReal
theorem NNReal.le_iInf_add_iInf {ι : Sort u_3} {ι' : Sort u_4} [Nonempty ι] [Nonempty ι'] {f : ι → NNReal} {g : ι' → NNReal} {a : NNReal} (h : ∀ (i : ι) (j : ι'), a ≤ f i + g j) :
a ≤ (⨅ (i : ι), f i) + ⨅ (j : ι'), g j
theorem NNReal.mul_finset_sup {α : Type u_3} (r : NNReal) (s : Finset α) (f : α → NNReal) :
r * s.sup f = s.sup fun (a : α) => r * f a
theorem NNReal.finset_sup_mul {α : Type u_3} (s : Finset α) (f : α → NNReal) (r : NNReal) :
s.sup f * r = s.sup fun (a : α) => f a * r
theorem NNReal.finset_sup_div {α : Type u_3} {f : α → NNReal} {s : Finset α} (r : NNReal) :
s.sup f / r = s.sup fun (a : α) => f a / r
@[simp]
theorem NNReal.bddAbove_range_natCast_iff {ι : Sort u_3} (f : ι → ℕ) :
BddAbove (Set.range fun (x : ι) => ↑(f x)) ↔ BddAbove (Set.range f)

Lemmas about subtraction #

In this section we provide a few lemmas about subtraction that do not fit well into any other typeclass. For lemmas about subtraction and addition see lemmas about OrderedSub in the file Mathlib/Algebra/Order/Sub/Basic.lean. See also mul_tsub and tsub_mul.

theorem NNReal.sub_div (a b c : NNReal) :
(a - b) / c = a / c - b / c
theorem NNReal.coe_sub_of_lt {a b : NNReal} (h : a < b) :
↑(b - a) = ↑b - ↑a

This lemma is needed for the norm_cast simp set. Outside of this use case Nat.coe_sub should be used.

theorem NNReal.iInf_mul {ι : Sort u_3} (f : ι → NNReal) (a : NNReal) :
iInf f * a = ⨅ (i : ι), f i * a
theorem NNReal.mul_iInf {ι : Sort u_3} (f : ι → NNReal) (a : NNReal) :
a * iInf f = ⨅ (i : ι), a * f i
theorem NNReal.mul_iSup {ι : Sort u_3} (f : ι → NNReal) (a : NNReal) :
a * ⨆ (i : ι), f i = ⨆ (i : ι), a * f i
theorem NNReal.iSup_mul {ι : Sort u_3} (f : ι → NNReal) (a : NNReal) :
(⨆ (i : ι), f i) * a = ⨆ (i : ι), f i * a
theorem NNReal.iSup_div {ι : Sort u_3} (f : ι → NNReal) (a : NNReal) :
(⨆ (i : ι), f i) / a = ⨆ (i : ι), f i / a
theorem NNReal.mul_iSup_le {ι : Sort u_3} {a g : NNReal} {h : ι → NNReal} (H : ∀ (j : ι), g * h j ≤ a) :
g * iSup h ≤ a
theorem NNReal.iSup_mul_le {ι : Sort u_3} {a : NNReal} {g : ι → NNReal} {h : NNReal} (H : ∀ (i : ι), g i * h ≤ a) :
iSup g * h ≤ a
theorem NNReal.iSup_mul_iSup_le {ι : Sort u_3} {a : NNReal} {g h : ι → NNReal} (H : ∀ (i j : ι), g i * h j ≤ a) :
iSup g * iSup h ≤ a
theorem NNReal.le_mul_iInf {ι : Sort u_3} [Nonempty ι] {a g : NNReal} {h : ι → NNReal} (H : ∀ (j : ι), a ≤ g * h j) :
a ≤ g * iInf h
theorem NNReal.le_iInf_mul {ι : Sort u_3} [Nonempty ι] {a : NNReal} {g : ι → NNReal} {h : NNReal} (H : ∀ (i : ι), a ≤ g i * h) :
a ≤ iInf g * h
theorem NNReal.le_iInf_mul_iInf {ι : Sort u_3} [Nonempty ι] {a : NNReal} {g h : ι → NNReal} (H : ∀ (i j : ι), a ≤ g i * h j) :
a ≤ iInf g * iInf h
@[simp]
theorem NNReal.natCast_iSup {ι : Sort u_4} (f : ι → ℕ) :
↑(⨆ (i : ι), f i) = ⨆ (i : ι), ↑(f i)
@[simp]
theorem NNReal.natCast_iInf {ι : Sort u_4} (f : ι → ℕ) :
↑(⨅ (i : ι), f i) = ⨅ (i : ι), ↑(f i)
theorem NNReal.toReal_eq (a b : NNReal) :
a = b ↔ ↑a = ↑b
theorem NNReal.toReal_le (a b : NNReal) :
a ≤ b ↔ ↑a ≤ ↑b
theorem NNReal.toReal_lt (a b : NNReal) :
a < b ↔ ↑a < ↑b
theorem NNReal.toReal_ne (a b : NNReal) :
a ≠ b ↔ ↑a ≠ ↑b
@[simp]
@[simp]
@[simp]
theorem NNReal.image_coe_Icc (x y : NNReal) :
toReal '' Set.Icc x y = Set.Icc ↑x ↑y
@[simp]
theorem NNReal.image_coe_Ioc (x y : NNReal) :
toReal '' Set.Ioc x y = Set.Ioc ↑x ↑y
@[simp]
theorem NNReal.image_coe_Ico (x y : NNReal) :
toReal '' Set.Ico x y = Set.Ico ↑x ↑y
@[simp]
theorem NNReal.image_coe_Ioo (x y : NNReal) :
toReal '' Set.Ioo x y = Set.Ioo ↑x ↑y
@[simp]
theorem NNReal.image_coe_uIcc (x y : NNReal) :
toReal '' Set.uIcc x y = Set.uIcc ↑x ↑y
@[simp]
theorem NNReal.image_coe_uIoc (x y : NNReal) :
toReal '' Set.uIoc x y = Set.uIoc ↑x ↑y
@[simp]
theorem NNReal.image_coe_uIoo (x y : NNReal) :
toReal '' Set.uIoo x y = Set.uIoo ↑x ↑y