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

Commit ac71292

Browse files
committed
chore(measure_theory/integral): generalize integral_smul_const (#10411)
* generalize to `is_R_or_C`; * add an `interval_integral` version.
1 parent 8f681f1 commit ac71292

File tree

4 files changed

+21
-17
lines changed

4 files changed

+21
-17
lines changed

src/analysis/special_functions/integrals.lean

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -112,20 +112,6 @@ end
112112
lemma interval_integrable_inv_one_add_sq : interval_integrable (λ x : ℝ, (1 + x^2)⁻¹) μ a b :=
113113
by simpa only [one_div] using interval_integrable_one_div_one_add_sq
114114

115-
/-! ### Integral of a function scaled by a constant -/
116-
117-
@[simp]
118-
lemma integral_const_mul : ∫ x in a..b, c * f x = c * ∫ x in a..b, f x :=
119-
integral_smul c f
120-
121-
@[simp]
122-
lemma integral_mul_const : ∫ x in a..b, f x * c = (∫ x in a..b, f x) * c :=
123-
by simp only [mul_comm, integral_const_mul]
124-
125-
@[simp]
126-
lemma integral_div : ∫ x in a..b, f x / c = (∫ x in a..b, f x) / c :=
127-
integral_mul_const c⁻¹
128-
129115
/-! ### Integrals of the form `c * ∫ x in a..b, f (c * x + d)` -/
130116

131117
@[simp]

src/measure_theory/function/conditional_expectation.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ calc ∫ a in s, (condexp_ind_smul hm ht hμt x) a ∂μ
11091109
= (∫ a in s, (condexp_L2 ℝ hm (indicator_const_Lp 2 ht hμt (1 : ℝ)) a • x) ∂μ) :
11101110
set_integral_congr_ae (hm s hs) ((condexp_ind_smul_ae_eq_smul hm ht hμt x).mono (λ x hx hxs, hx))
11111111
... = (∫ a in s, condexp_L2 ℝ hm (indicator_const_Lp 2 ht hμt (1 : ℝ)) a ∂μ) • x :
1112-
by rw integral_smul_const _ x
1112+
integral_smul_const _ x
11131113
... = (∫ a in s, indicator_const_Lp 2 ht hμt (1 : ℝ) a ∂μ) • x :
11141114
by rw @integral_condexp_L2_eq α _ ℝ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hm
11151115
(indicator_const_Lp 2 ht hμt (1 : ℝ)) hs hμs

src/measure_theory/integral/interval_integral.lean

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,23 @@ by simpa only [sub_eq_add_neg] using (integral_add hf hg.neg).trans (congr_arg _
543543
(r : 𝕜) (f : α → E) : ∫ x in a..b, r • f x ∂μ = r • ∫ x in a..b, f x ∂μ :=
544544
by simp only [interval_integral, integral_smul, smul_sub]
545545

546+
@[simp] lemma integral_smul_const {𝕜 : Type*} [is_R_or_C 𝕜] [normed_space 𝕜 E]
547+
[is_scalar_tower ℝ 𝕜 E] [measurable_space 𝕜] [borel_space 𝕜] (f : α → 𝕜) (c : E) :
548+
∫ x in a..b, f x • c ∂μ = (∫ x in a..b, f x ∂μ) • c :=
549+
by simp only [interval_integral_eq_integral_interval_oc, integral_smul_const, smul_assoc]
550+
551+
@[simp] lemma integral_const_mul {𝕜 : Type*} [is_R_or_C 𝕜] [measurable_space 𝕜] [borel_space 𝕜]
552+
(r : 𝕜) (f : α → 𝕜) : ∫ x in a..b, r * f x ∂μ = r * ∫ x in a..b, f x ∂μ :=
553+
integral_smul r f
554+
555+
@[simp] lemma integral_mul_const {𝕜 : Type*} [is_R_or_C 𝕜] [measurable_space 𝕜] [borel_space 𝕜]
556+
(r : 𝕜) (f : α → 𝕜) : ∫ x in a..b, f x * r ∂μ = ∫ x in a..b, f x ∂μ * r :=
557+
by simpa only [mul_comm r] using integral_const_mul r f
558+
559+
@[simp] lemma integral_div {𝕜 : Type*} [is_R_or_C 𝕜] [measurable_space 𝕜] [borel_space 𝕜]
560+
(r : 𝕜) (f : α → 𝕜) : ∫ x in a..b, f x / r ∂μ = ∫ x in a..b, f x ∂μ / r :=
561+
by simpa only [div_eq_mul_inv] using integral_mul_const r⁻¹ f
562+
546563
lemma integral_const' (c : E) :
547564
∫ x in a..b, c ∂μ = ((μ $ Ioc a b).to_real - (μ $ Ioc b a).to_real) • c :=
548565
by simp only [interval_integral, set_integral_const, sub_smul]

src/measure_theory/integral/set_integral.lean

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -879,11 +879,12 @@ lemma integral_pair {f : α → E} {g : α → F} (hf : integrable f μ) (hg : i
879879
∫ x, (f x, g x) ∂μ = (∫ x, f x ∂μ, ∫ x, g x ∂μ) :=
880880
have _ := hf.prod_mk hg, prod.ext (fst_integral this) (snd_integral this)
881881

882-
lemma integral_smul_const (f : α → ℝ) (c : E) :
882+
lemma integral_smul_const {𝕜 : Type*} [is_R_or_C 𝕜] [normed_space 𝕜 E] [is_scalar_tower ℝ 𝕜 E]
883+
[measurable_space 𝕜] [borel_space 𝕜] (f : α → 𝕜) (c : E) :
883884
∫ x, f x • c ∂μ = (∫ x, f x ∂μ) • c :=
884885
begin
885886
by_cases hf : integrable f μ,
886-
{ exact ((continuous_linear_map.id ℝ ℝ).smul_right c).integral_comp_comm hf },
887+
{ exact ((1 : 𝕜 →L[𝕜] 𝕜).smul_right c).integral_comp_comm hf },
887888
{ by_cases hc : c = 0,
888889
{ simp only [hc, integral_zero, smul_zero] },
889890
rw [integral_undef hf, integral_undef, zero_smul],

0 commit comments

Comments
 (0)