Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit c14c8fc

Browse files
committed
feat(measure_theory/integral/average): Lebesgue average (#19199)
Define the Lebesgue integral version of the average of a measurable function and prove the corresponding first moment method.
1 parent e8e130d commit c14c8fc

File tree

6 files changed

+369
-31
lines changed

6 files changed

+369
-31
lines changed

src/data/real/ennreal.lean

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ noncomputable instance : linear_ordered_comm_monoid_with_zero ℝ≥0∞ :=
105105
.. ennreal.linear_ordered_add_comm_monoid_with_top,
106106
.. (show comm_semiring ℝ≥0∞, from infer_instance) }
107107

108+
instance : unique (add_units ℝ≥0∞) :=
109+
{ default := 0,
110+
uniq := λ a, add_units.ext $ le_zero_iff.1 $ by { rw ←a.add_neg, exact le_self_add } }
111+
108112
instance : inhabited ℝ≥0∞ := ⟨0
109113

110114
instance : has_coe ℝ≥0 ℝ≥0∞ := ⟨ option.some ⟩
@@ -1056,6 +1060,12 @@ by rw [div_eq_mul_inv, mul_assoc, ennreal.inv_mul_cancel h0 hI, mul_one]
10561060
protected lemma mul_div_cancel' (h0 : a ≠ 0) (hI : a ≠ ∞) : a * (b / a) = b :=
10571061
by rw [mul_comm, ennreal.div_mul_cancel h0 hI]
10581062

1063+
protected lemma mul_comm_div : a / b * c = a * (c / b) :=
1064+
by simp only [div_eq_mul_inv, mul_comm, mul_assoc]
1065+
1066+
protected lemma mul_div_right_comm : a * b / c = a / c * b :=
1067+
by simp only [div_eq_mul_inv, mul_comm, mul_assoc]
1068+
10591069
instance : has_involutive_inv ℝ≥0∞ :=
10601070
{ inv := has_inv.inv,
10611071
inv_inv := λ a, by
@@ -1077,6 +1087,9 @@ inv_top ▸ inv_inj
10771087

10781088
protected lemma inv_ne_zero : a⁻¹ ≠ 0 ↔ a ≠ ∞ := by simp
10791089

1090+
protected lemma div_pos (ha : a ≠ 0) (hb : b ≠ ∞) : 0 < a / b :=
1091+
ennreal.mul_pos ha $ ennreal.inv_ne_zero.2 hb
1092+
10801093
protected lemma mul_inv {a b : ℝ≥0∞} (ha : a ≠ 0 ∨ b ≠ ∞) (hb : a ≠ ∞ ∨ b ≠ 0) :
10811094
(a * b)⁻¹ = a⁻¹ * b⁻¹ :=
10821095
begin

0 commit comments

Comments
 (0)