Zulip Chat Archive

Stream: new members

Topic: Right way to get a constant out of an integral


Colin Jones ⚛️ (Feb 24 2025 at 03:47):

Hi,

I'm trying to prove the following statement, but am unable to pull the constant out the integral. Am I missing something? I don't know how to prove this.

import Mathlib

open Real

example :  (x : ) in Set.Ioi 1, (1/x) * 2 = 2 *  (x : ) in Set.Ioi 1, (1/x) := by
  simp_rw [integral_smul_const]

Chris Wong (Feb 24 2025 at 05:16):

What error message do you get?

Chris Wong (Feb 24 2025 at 05:16):

In docs#integral_smul_const, the constant is always on the right, but your example switches the constant to the left.

Aaron Liu (Feb 24 2025 at 12:40):

import Mathlib

open Real

example :  (x : ) in Set.Ioi 1, (1/x) * 2 = 2 *  (x : ) in Set.Ioi 1, (1/x) := by
  simp_rw [ smul_eq_mul, integral_smul_const, smul_eq_mul, mul_comm]

Floris van Doorn (Feb 24 2025 at 14:48):

There are indeed lemmas missing here. Analogous to docs#intervalIntegral.integral_mul_const it would be nice to have MeasureTheory.integral_mul_const and MeasureTheory.integral_const_mul. Please make a PR!

Rémy Degenne (Feb 24 2025 at 15:08):

MeasureTheory.integral_mul_right
We should change its name to integral_mul_const.

Colin Jones ⚛️ (Feb 24 2025 at 17:24):

Thanks all. Is there a way to prove this too?

example :  (x : ) in Set.Ioi 1, x * (1/x^3) =  (x : ) in Set.Ioi 1, 1/x^2 := by
  field_simp

Ruben Van de Velde (Feb 24 2025 at 17:45):

Not without imports, I'm afraid

Aaron Liu (Feb 24 2025 at 17:45):

import Mathlib

example :  (x : ) in Set.Ioi 1, x * (1/x^3) =  (x : ) in Set.Ioi 1, 1/x^2 := by
  apply MeasureTheory.setIntegral_congr_fun (by measurability)
  intro x _
  by_cases hx : x = 0
  · subst hx
    simp
  · field_simp
    ring

Colin Jones ⚛️ (Feb 24 2025 at 19:47):

Thanks for the help. I've also run into issues with proving integrability and fun_prop doesn't seem to work.

How would I prove something like:

example (\sigma : \R)  : Integrable (fun (r :\R) => -σ / r ^ 4) (volume.restrict (Set.Ioi rc)) := by

Etienne Marion (Feb 24 2025 at 19:48):

Can you provide a #mwe please?

Colin Jones ⚛️ (Feb 25 2025 at 01:01):

example (σ : ) : Integrable (fun a => σ / a ^ 10) (volume.restrict (Set.Ioi rc)) := by
  dsimp [Integrable]
  sorry

Aaron Liu (Feb 25 2025 at 01:02):

You need 0 < rc ∨ σ = 0 for this

Colin Jones ⚛️ (Feb 25 2025 at 01:02):

Sorry forgot to include that condition

Colin Jones ⚛️ (Feb 25 2025 at 01:02):

example (σ : ) (hr : 0 < rc) : Integrable (fun a => σ / a ^ 10) (volume.restrict (Set.Ioi rc)) := by
  dsimp [Integrable]
  sorry

Aaron Liu (Feb 25 2025 at 01:20):

import Mathlib

open MeasureTheory

example (σ : ) (hr : 0 < rc) : Integrable (fun a => σ / a ^ 10) (volume.restrict (Set.Ioi rc)) := by
  apply Integrable.const_mul
  rw [ IntegrableOn]
  have heq : Set.EqOn (fun x  x ^ (-10 : )) (fun x  (x ^ 10)⁻¹) (Set.Ioi rc) := by
    intro x hx
    simp_rw [Real.rpow_neg (hr.trans hx).le,  Real.rpow_natCast, Nat.cast_ofNat]
  refine IntegrableOn.congr_fun ?_ heq (by measurability)
  exact integrableOn_Ioi_rpow_of_lt (by norm_num) hr

Etienne Marion (Feb 25 2025 at 08:00):

Colin Jones ⚛️ said:

Sorry forgot to include that condition

This is still not a #mwe, imports are missing


Last updated: May 02 2025 at 03:31 UTC