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

Commit 61db67d

Browse files
committed
chore(measure_theory/integration): define composition of a simple_func and a measurable function (#3667)
1 parent 292c921 commit 61db67d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/measure_theory/integration.lean

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,20 @@ lemma map_preimage_singleton (f : α →ₛ β) (g : β → γ) (c : γ) :
184184
(f.map g) ⁻¹' {c} = f ⁻¹' ↑(f.range.filter (λ b, g b = c)) :=
185185
map_preimage _ _ _
186186

187+
/-- Composition of a `simple_fun` and a measurable function is a `simple_func`. -/
188+
def comp [measurable_space β] (f : β →ₛ γ) (g : α → β) (hgm : measurable g) : α →ₛ γ :=
189+
{ to_fun := f ∘ g,
190+
finite_range' := f.finite_range.subset $ set.range_comp_subset_range _ _,
191+
is_measurable_fiber' := λ z, hgm (f.is_measurable_fiber z) }
192+
193+
@[simp] lemma coe_comp [measurable_space β] (f : β →ₛ γ) {g : α → β} (hgm : measurable g) :
194+
⇑(f.comp g hgm) = f ∘ g :=
195+
rfl
196+
197+
lemma range_comp_subset_range [measurable_space β] (f : β →ₛ γ) {g : α → β} (hgm : measurable g) :
198+
(f.comp g hgm).range ⊆ f.range :=
199+
finset.coe_subset.1 $ by simp only [coe_range, coe_comp, set.range_comp_subset_range]
200+
187201
/-- If `f` is a simple function taking values in `β → γ` and `g` is another simple function
188202
with the same domain and codomain `β`, then `f.seq g = f a (g a)`. -/
189203
def seq (f : α →ₛ (β → γ)) (g : α →ₛ β) : α →ₛ γ := f.bind (λf, g.map f)
@@ -1361,6 +1375,8 @@ lemma lintegral_dirac (a : α) {f : α → ennreal} (hf : measurable f) :
13611375
∫⁻ a, f a ∂(dirac a) = f a :=
13621376
by simp [lintegral_congr_ae (eventually_eq_dirac hf)]
13631377

1378+
/-- Given a measure `μ : measure α` and a function `f : α → ennreal`, `μ.with_density f` is the
1379+
measure such that for a measurable set `s` we have `μ.with_density f s = ∫⁻ a in s, f a ∂μ`. -/
13641380
def measure.with_density (μ : measure α) (f : α → ennreal) : measure α :=
13651381
measure.of_measurable (λs hs, ∫⁻ a in s, f a ∂μ) (by simp) (λ s hs hd, lintegral_Union hs hd _)
13661382

0 commit comments

Comments
 (0)