Skip to content

Commit b8e91f6

Browse files
committed
feat(MeasureTheory): multiplication by a constant can be pulled out of an integral (#24397)
This PR shows that `∫ x, f x * c ∂μ = (∫ x, f x ∂μ) * c` and `∫ x, c * f x ∂μ = c * ∫ x, f x ∂μ` when `c` is a constant, and where `f` takes values in a Banach algebra.
1 parent fed914b commit b8e91f6

34 files changed

+89
-63
lines changed

Archive/Hairer.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def L : MvPolynomial ι ℝ →ₗ[ℝ]
8989
have int := ContDiffSupportedOn.integrable_eval_mul (ι := ι)
9090
.mk₂ ℝ (fun p f ↦ ∫ x : EuclideanSpace ℝ ι, eval x p • f x)
9191
(fun p₁ p₂ f ↦ by simp [add_mul, integral_add (int p₁ f) (int p₂ f)])
92-
(fun r p f ↦ by simp [mul_assoc, integral_mul_left])
92+
(fun r p f ↦ by simp [mul_assoc, integral_const_mul])
9393
(fun p f₁ f₂ ↦ by simp_rw [smul_eq_mul, ← integral_add (int p _) (int p _), ← mul_add]; rfl)
9494
fun r p f ↦ by simp_rw [← integral_smul, smul_comm r]; rfl
9595

Mathlib/Analysis/Calculus/BumpFunction/FiniteDimension.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ theorem y_eq_one_of_mem_closedBall {D : ℝ} {x : E} (Dpos : 0 < D)
345345
have Bx : φ x = 1 := B _ (mem_ball_self Dpos)
346346
have B' : ∀ y, y ∈ ball x D → φ y = φ x := by rw [Bx]; exact B
347347
rw [convolution_eq_right' _ (le_of_eq (w_support E Dpos)) B']
348-
simp only [lsmul_apply, Algebra.id.smul_eq_mul, integral_mul_right, w_integral E Dpos, Bx,
348+
simp only [lsmul_apply, Algebra.id.smul_eq_mul, integral_mul_const, w_integral E Dpos, Bx,
349349
one_mul]
350350

351351
theorem y_eq_zero_of_not_mem_ball {D : ℝ} {x : E} (Dpos : 0 < D) (hx : x ∉ ball (0 : E) (1 + D)) :
@@ -378,7 +378,7 @@ theorem y_le_one {D : ℝ} (x : E) (Dpos : 0 < D) : y D x ≤ 1 := by
378378
exact continuous_const.mul ((u_continuous E).comp (continuous_id.const_smul _))
379379
have B : (w D ⋆[lsmul ℝ ℝ, μ] fun _ => (1 : ℝ)) x = 1 := by
380380
simp only [convolution, ContinuousLinearMap.map_smul, mul_inv_rev, coe_smul', mul_one,
381-
lsmul_apply, Algebra.id.smul_eq_mul, integral_mul_left, w_integral E Dpos, Pi.smul_apply]
381+
lsmul_apply, Algebra.id.smul_eq_mul, integral_const_mul, w_integral E Dpos, Pi.smul_apply]
382382
exact A.trans (le_of_eq B)
383383

384384
theorem y_pos_of_mem_ball {D : ℝ} {x : E} (Dpos : 0 < D) (D_lt_one : D < 1)

Mathlib/Analysis/Calculus/Rademacher.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ theorem integral_lineDeriv_mul_eq
187187
simp only [S1] at A; exact tendsto_nhds_unique A B
188188
intro t
189189
suffices S2 : ∫ x, (f (x + t • v) - f x) * g x ∂μ = ∫ x, f x * (g (x + t • (-v)) - g x) ∂μ by
190-
simp only [smul_eq_mul, mul_assoc, integral_mul_left, S2, mul_neg, mul_comm (f _)]
190+
simp only [smul_eq_mul, mul_assoc, integral_const_mul, S2, mul_neg, mul_comm (f _)]
191191
have S3 : ∫ x, f (x + t • v) * g x ∂μ = ∫ x, f x * g (x + t • (-v)) ∂μ := by
192192
rw [← integral_add_right_eq_self _ (t • (-v))]; simp
193193
simp_rw [_root_.sub_mul, _root_.mul_sub]
@@ -220,7 +220,7 @@ theorem ae_lineDeriv_sum_eq
220220
suffices S1 : ∫ x, lineDeriv ℝ f x (∑ i ∈ s, a i • v i) * g x ∂μ
221221
= ∑ i ∈ s, a i * ∫ x, lineDeriv ℝ f x (v i) * g x ∂μ by
222222
dsimp only [smul_eq_mul, Pi.smul_apply]
223-
simp_rw [← mul_assoc, mul_comm _ (a _), mul_assoc, integral_mul_left, mul_comm (g _), S1]
223+
simp_rw [← mul_assoc, mul_comm _ (a _), mul_assoc, integral_const_mul, mul_comm (g _), S1]
224224
suffices S2 : ∫ x, (∑ i ∈ s, a i * fderiv ℝ g x (v i)) * f x ∂μ =
225225
∑ i ∈ s, a i * ∫ x, fderiv ℝ g x (v i) * f x ∂μ by
226226
obtain ⟨D, g_lip⟩ : ∃ D, LipschitzWith D g :=
@@ -231,7 +231,7 @@ theorem ae_lineDeriv_sum_eq
231231
simp only [integral_neg, mul_neg, Finset.sum_neg_distrib, neg_inj]
232232
exact S2
233233
suffices B : ∀ i ∈ s, Integrable (fun x ↦ a i * (fderiv ℝ g x (v i) * f x)) μ by
234-
simp_rw [Finset.sum_mul, mul_assoc, integral_finset_sum s B, integral_mul_left]
234+
simp_rw [Finset.sum_mul, mul_assoc, integral_finset_sum s B, integral_const_mul]
235235
intro i _hi
236236
let L : (E →L[ℝ] ℝ) → ℝ := fun f ↦ f (v i)
237237
change Integrable (fun x ↦ a i * ((L ∘ (fderiv ℝ g)) x * f x)) μ

Mathlib/Analysis/Convolution.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ theorem Integrable.convolution_integrand (hf : Integrable f ν) (hg : Integrable
288288
(Eventually.of_forall fun t => (?_ : _ ≤ ‖L‖ * ‖f t‖ * ∫ x, ‖g (x - t)‖ ∂μ))
289289
· simp only [integral_sub_right_eq_self (‖g ·‖)]
290290
exact (hf.norm.const_mul _).mul_const _
291-
· simp_rw [← integral_mul_left]
291+
· simp_rw [← integral_const_mul]
292292
rw [Real.norm_of_nonneg (by positivity)]
293293
exact integral_mono_of_nonneg (Eventually.of_forall fun t => norm_nonneg _)
294294
((hg.comp_sub_right t).norm.const_mul _) (Eventually.of_forall fun t => L.le_opNorm₂ _ _)
@@ -765,13 +765,13 @@ theorem dist_convolution_le' {x₀ : G} {R ε : ℝ} {z₀ : E'} (hε : 0 ≤ ε
765765
rw [← integral_sub hfg.integrable]; swap; · exact (L.flip z₀).integrable_comp hif
766766
refine (norm_integral_le_of_norm_le ((L.integrable_comp hif).norm.mul_const ε)
767767
(Eventually.of_forall h2)).trans ?_
768-
rw [integral_mul_right]
768+
rw [integral_mul_const]
769769
refine mul_le_mul_of_nonneg_right ?_ hε
770770
have h3 : ∀ t, ‖L (f t)‖ ≤ ‖L‖ * ‖f t‖ := by
771771
intro t
772772
exact L.le_opNorm (f t)
773773
refine (integral_mono (L.integrable_comp hif).norm (hif.norm.const_mul _) h3).trans_eq ?_
774-
rw [integral_mul_left]
774+
rw [integral_const_mul]
775775

776776
variable [NormedSpace ℝ E] [NormedSpace ℝ E'] [CompleteSpace E']
777777

@@ -930,7 +930,7 @@ theorem convolution_assoc (hL : ∀ (x : E) (y : E') (z : E''), L₂ (L x y) z =
930930
(L₃ (f t)).integrable_comp <| ht.of_norm L₄ hg hk, ?_⟩
931931
refine (hfgk.const_mul (‖L₃‖ * ‖L₄‖)).mono' h2_meas
932932
(((quasiMeasurePreserving_sub_left_of_right_invariant ν x₀).ae hgk).mono fun t ht => ?_)
933-
simp_rw [convolution_def, mul_apply', mul_mul_mul_comm ‖L₃‖ ‖L₄‖, ← integral_mul_left]
933+
simp_rw [convolution_def, mul_apply', mul_mul_mul_comm ‖L₃‖ ‖L₄‖, ← integral_const_mul]
934934
rw [Real.norm_of_nonneg (by positivity)]
935935
refine integral_mono_of_nonneg (Eventually.of_forall fun t => norm_nonneg _)
936936
((ht.const_mul _).const_mul _) (Eventually.of_forall fun s => ?_)

Mathlib/Analysis/Distribution/SchwartzSpace.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ lemma integral_pow_mul_le_of_le_of_pow_mul_le
658658
(hf : ∀ x, ‖f x‖ ≤ C₁) (h'f : ∀ x, ‖x‖ ^ (k + μ.integrablePower) * ‖f x‖ ≤ C₂) :
659659
∫ x, ‖x‖ ^ k * ‖f x‖ ∂μ ≤ 2 ^ μ.integrablePower *
660660
(∫ x, (1 + ‖x‖) ^ (- (μ.integrablePower : ℝ)) ∂μ) * (C₁ + C₂) := by
661-
rw [← integral_mul_left, ← integral_mul_right]
661+
rw [← integral_const_mul, ← integral_mul_const]
662662
apply integral_mono_of_nonneg
663663
· filter_upwards with v using by positivity
664664
· exact ((integrable_pow_neg_integrablePower μ).const_mul _).mul_const _
@@ -1122,7 +1122,7 @@ def integralCLM : 𝓢(D, V) →L[𝕜] V := by
11221122
rw [rpow_neg (by positivity), ← div_eq_inv_mul, le_div_iff₀' (by positivity), rpow_natCast]
11231123
simpa using one_add_le_sup_seminorm_apply (m := m) (k := n) (n := 0) le_rfl le_rfl f x
11241124
apply (integral_mono (by simpa using f.integrable_pow_mul μ 0) _ h').trans
1125-
· rw [integral_mul_right, ← mul_assoc, mul_comm (2 ^ n)]
1125+
· rw [integral_mul_const, ← mul_assoc, mul_comm (2 ^ n)]
11261126
rfl
11271127
apply h.mul_const
11281128

Mathlib/Analysis/Fourier/AddCircle.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ theorem fourierCoeffOn_of_hasDeriv_right {a b : ℝ} (hab : a < b) {f f' : ℝ
483483
rw [(by ring : ((b - a : ℝ) : ℂ) / (-2 * π * I * n) = ((b - a : ℝ) : ℂ) * (1 / (-2 * π * I * n)))]
484484
have s2 : (b : AddCircle (b - a)) = (a : AddCircle (b - a)) := by
485485
simpa using coe_add_period (b - a) a
486-
rw [s2, integral_const_mul, ← sub_mul, mul_sub, mul_sub]
486+
rw [s2, intervalIntegral.integral_const_mul, ← sub_mul, mul_sub, mul_sub]
487487
congr 1
488488
· conv_lhs => rw [mul_comm, mul_div, mul_one]
489489
rw [div_eq_iff (ofReal_ne_zero.mpr hT.out.ne')]

Mathlib/Analysis/Fourier/FourierTransformDeriv.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ theorem norm_fourierPowSMulRight_iteratedFDeriv_fourierIntegral_le [FiniteDimens
613613
Integrable (fun v ↦ ‖v‖ ^ p.1 * ‖iteratedFDeriv ℝ p.2 f v‖) μ := by
614614
simp only [Finset.mem_product, Finset.mem_range_succ_iff] at hp
615615
exact h'f _ _ (le_trans (by simpa using hp.1) hk) (le_trans (by simpa using hp.2) hn)
616-
rw [← integral_finset_sum _ I, ← integral_mul_left]
616+
rw [← integral_finset_sum _ I, ← integral_const_mul]
617617
apply integral_mono_of_nonneg
618618
· filter_upwards with v using norm_nonneg _
619619
· exact (integrable_finset_sum _ I).const_mul _

Mathlib/Analysis/Fourier/Inversion.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ lemma tendsto_integral_gaussian_smul' (hf : Integrable f) {v : V} (h'f : Continu
110110
atTop (𝓝 (f v)) := by
111111
apply tendsto_integral_comp_smul_smul_of_integrable'
112112
· exact fun x ↦ by positivity
113-
· rw [integral_mul_left, GaussianFourier.integral_rexp_neg_mul_sq_norm (by positivity)]
113+
· rw [integral_const_mul, GaussianFourier.integral_rexp_neg_mul_sq_norm (by positivity)]
114114
nth_rewrite 2 [← pow_one π]
115115
rw [← rpow_natCast, ← rpow_natCast, ← rpow_sub pi_pos, ← rpow_mul pi_nonneg,
116116
← rpow_add pi_pos]

Mathlib/Analysis/ODE/PicardLindelof.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ theorem dist_next_apply_le_of_le {f₁ f₂ : FunSpace v} {n : ℕ} {d : ℝ}
272272
rw [v.proj_of_mem]
273273
exact uIcc_subset_Icc v.t₀.2 t.2 <| Ioc_subset_Icc_self hτ
274274
_ = (v.L * |t.1 - v.t₀|) ^ (n + 1) / (n + 1)! * d := by
275-
simp_rw [mul_pow, div_eq_mul_inv, mul_assoc, MeasureTheory.integral_mul_left,
276-
MeasureTheory.integral_mul_right, integral_pow_abs_sub_uIoc, div_eq_mul_inv,
275+
simp_rw [mul_pow, div_eq_mul_inv, mul_assoc, MeasureTheory.integral_const_mul,
276+
MeasureTheory.integral_mul_const, integral_pow_abs_sub_uIoc, div_eq_mul_inv,
277277
pow_succ' (v.L : ℝ), Nat.factorial_succ, Nat.cast_mul, Nat.cast_succ, mul_inv, mul_assoc]
278278

279279
theorem dist_iterate_next_apply_le (f₁ f₂ : FunSpace v) (n : ℕ) (t : Icc v.tMin v.tMax) :

Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ lemma integral_cpow_mul_exp_neg_mul_Ioi {a : ℂ} {r : ℝ} (ha : 0 < a.re) (hr
384384
rw [integral_comp_mul_left_Ioi (fun x ↦ _ * x ^ (a - 1) * exp (-x)) _ hr, mul_zero,
385385
real_smul, ← one_div, ofReal_div, ofReal_one]
386386
_ = 1 / r * (1 / r : ℂ) ^ (a - 1) * (∫ (t : ℝ) in Ioi 0, t ^ (a - 1) * exp (-t)) := by
387-
simp_rw [← integral_mul_left, mul_assoc]
387+
simp_rw [← MeasureTheory.integral_const_mul, mul_assoc]
388388
_ = (1 / r) ^ a * Gamma a := by
389389
rw [aux, Gamma_eq_integral ha]
390390
congr 2 with x

0 commit comments

Comments
 (0)