Zulip Chat Archive
Stream: new members
Topic: commuting casting with integration
Paul Nelson (Feb 09 2024 at 18:52):
Does anyone know how to close this sorry? It says that if an integral involving real quantities vanishes, then so does the corresponding integral of quantities cast to the complex numbers.
import Mathlib.MeasureTheory.Integral.IntervalIntegral
example (a b : ℝ) (f : ℝ → ℝ) (hf : IntervalIntegrable f volume a b)
(h : ∫ (x : ℝ) in a..b, f x = 0) :
(∫ (x : ℝ) in a..b, (f x : ℂ)) = 0 := by
sorry
Here's an unsuccessful attempt:
import Mathlib.MeasureTheory.Integral.IntervalIntegral
example (a b : ℝ) (f : ℝ → ℝ) (hf : IntervalIntegrable f volume a b)
(h : ∫ (x : ℝ) in a..b, f x = 0) :
(∫ (x : ℝ) in a..b, (f x : ℂ)) = 0 := by
have : (∫ (x : ℝ) in a..b, (f x : ℂ)) = ((∫ (x : ℝ) in a..b, f x) : ℂ) := rfl
rw [this] -- this rw has no effect on the goal state
sorry
Kevin Buzzard (Feb 09 2024 at 19:23):
Not at lean right now but my guess is that the have
is a syntactic equality? i.e. it doesn't say what you think it says?
Paul Nelson (Feb 09 2024 at 19:24):
indeed, the "have" just states a tautology
Paul Nelson (Feb 09 2024 at 19:24):
thing = thing
Mario Carneiro (Feb 09 2024 at 19:26):
maybe you want to say that an intermediate has type ℝ
instead?
Mario Carneiro (Feb 09 2024 at 19:27):
have : (∫ (x : ℝ) in a..b, f x : ℂ) = (∫ (x : ℝ) in a..b, f x : ℝ) := _
is probably what you wanted to say
Paul Nelson (Feb 09 2024 at 19:29):
using Mario's suggestion, I closed it just now as follows:
import Mathlib.MeasureTheory.Integral.IntervalIntegral
example (a b : ℝ) (f : ℝ → ℝ) (hf : IntervalIntegrable f volume a b)
(h : ∫ (x : ℝ) in a..b, f x = 0) :
(∫ (x : ℝ) in a..b, (f x : ℂ)) = 0 := by
have : (∫ (x : ℝ) in a..b, f x : ℂ) = (∫ (x : ℝ) in a..b, f x : ℝ) := by
exact intervalIntegral.integral_ofReal
rw [this]
rw [h]
rfl
I guess one could abbreviate this, but the key was being able to formulate the have
correctly, which suggested the appropriate lemma via exact?
. Thanks!
Last updated: May 02 2025 at 03:31 UTC