@@ -184,6 +184,20 @@ lemma map_preimage_singleton (f : α →ₛ β) (g : β → γ) (c : γ) :
184
184
(f.map g) ⁻¹' {c} = f ⁻¹' ↑(f.range.filter (λ b, g b = c)) :=
185
185
map_preimage _ _ _
186
186
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
+
187
201
/-- If `f` is a simple function taking values in `β → γ` and `g` is another simple function
188
202
with the same domain and codomain `β`, then `f.seq g = f a (g a)`. -/
189
203
def seq (f : α →ₛ (β → γ)) (g : α →ₛ β) : α →ₛ γ := f.bind (λf, g.map f)
@@ -1361,6 +1375,8 @@ lemma lintegral_dirac (a : α) {f : α → ennreal} (hf : measurable f) :
1361
1375
∫⁻ a, f a ∂(dirac a) = f a :=
1362
1376
by simp [lintegral_congr_ae (eventually_eq_dirac hf)]
1363
1377
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 ∂μ`. -/
1364
1380
def measure.with_density (μ : measure α) (f : α → ennreal) : measure α :=
1365
1381
measure.of_measurable (λs hs, ∫⁻ a in s, f a ∂μ) (by simp) (λ s hs hd, lintegral_Union hs hd _)
1366
1382
0 commit comments