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

Commit 2d57545

Browse files
committed
feat(measure_theory/measure/integral): integral over an encodable type (#9191)
1 parent 790e98f commit 2d57545

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

src/measure_theory/integral/lebesgue.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,6 +1845,15 @@ lemma lintegral_dirac [measurable_singleton_class α] (a : α) (f : α → ℝ
18451845
∫⁻ a, f a ∂(dirac a) = f a :=
18461846
by simp [lintegral_congr_ae (ae_eq_dirac f)]
18471847

1848+
lemma lintegral_encodable {α : Type*} {m : measurable_space α} [encodable α]
1849+
[measurable_singleton_class α] (f : α → ℝ≥0∞) (μ : measure α) :
1850+
∫⁻ a, f a ∂μ = ∑' a, f a * μ {a} :=
1851+
begin
1852+
conv_lhs { rw [← sum_smul_dirac μ, lintegral_sum_measure] },
1853+
congr' 1 with a : 1,
1854+
rw [lintegral_smul_measure, lintegral_dirac, mul_comm],
1855+
end
1856+
18481857
lemma lintegral_count' {f : α → ℝ≥0∞} (hf : measurable f) :
18491858
∫⁻ a, f a ∂count = ∑' a, f a :=
18501859
begin

src/measure_theory/measure/measure_space.lean

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,6 +1099,22 @@ begin
10991099
tsum_add ennreal.summable ennreal.summable],
11001100
end
11011101

1102+
/-- If `f` is a map with encodable codomain, then `map f μ` is the sum of Dirac measures -/
1103+
lemma map_eq_sum [encodable β] [measurable_singleton_class β]
1104+
(μ : measure α) (f : α → β) (hf : measurable f) :
1105+
map f μ = sum (λ b : β, μ (f ⁻¹' {b}) • dirac b) :=
1106+
begin
1107+
ext1 s hs,
1108+
have : ∀ y ∈ s, measurable_set (f ⁻¹' {y}), from λ y _, hf (measurable_set_singleton _),
1109+
simp [← tsum_measure_preimage_singleton (countable_encodable s) this, *,
1110+
tsum_subtype s (λ b, μ (f ⁻¹' {b})), ← indicator_mul_right s (λ b, μ (f ⁻¹' {b}))]
1111+
end
1112+
1113+
/-- A measure on an encodable type is a sum of dirac measures. -/
1114+
@[simp] lemma sum_smul_dirac [encodable α] [measurable_singleton_class α] (μ : measure α) :
1115+
sum (λ a, μ {a} • dirac a) = μ :=
1116+
by simpa using (map_eq_sum μ id measurable_id).symm
1117+
11021118
omit m0
11031119
end sum
11041120

0 commit comments

Comments
 (0)