-- Mathlib/MeasureTheory/Function/LocallyIntegrable.lean
theorem LocallyIntegrable.integrable_smul_left_of_hasCompactSupport
    [NormedSpace ℝ E] [OpensMeasurableSpace X] [T2Space X]
    (hf : LocallyIntegrable f μ) {g : X → ℝ} (hg : Continuous g) (h'g : HasCompactSupport g) :
    Integrable (fun x ↦ g x • f x) μ

Proof state:
X : Type u_1
E : Type u_3
inst✝⁵ : MeasurableSpace X
inst✝⁴ : TopologicalSpace X
inst✝³ : NormedAddCommGroup E
f : X → E
μ : Measure X
inst✝² : NormedSpace ℝ E
inst✝¹ : OpensMeasurableSpace X
inst✝ : T2Space X
hf : LocallyIntegrable f μ
g : X → ℝ
hg : Continuous g
h'g : HasCompactSupport g
K : Set X := tsupport g
hK : IsCompact K
x : X
hx : x ∉ K
⊢ g x • f x = 0

Tactic:
simp [image_eq_zero_of_nmem_tsupport hx]

Result:
no goals

Proof state:
X : Type u_1
E : Type u_3
inst✝⁵ : MeasurableSpace X
inst✝⁴ : TopologicalSpace X
inst✝³ : NormedAddCommGroup E
f : X → E
μ : Measure X
inst✝² : NormedSpace ℝ E
inst✝¹ : OpensMeasurableSpace X
inst✝ : T2Space X
hf : LocallyIntegrable f μ
g : X → ℝ
hg : Continuous g
h'g : HasCompactSupport g
K : Set X := tsupport g
hK : IsCompact K
this : (K.indicator fun x => g x • f x) = fun x => g x • f x
⊢ Integrable (fun x => g x • f x) μ

Tactic:
rw [← this, indicator_smul]

Result:
X : Type u_1
E : Type u_3
inst✝⁵ : MeasurableSpace X
inst✝⁴ : TopologicalSpace X
inst✝³ : NormedAddCommGroup E
f : X → E
μ : Measure X
inst✝² : NormedSpace ℝ E
inst✝¹ : OpensMeasurableSpace X
inst✝ : T2Space X
hf : LocallyIntegrable f μ
g : X → ℝ
hg : Continuous g
h'g : HasCompactSupport g
K : Set X := tsupport g
hK : IsCompact K
this : (K.indicator fun x => g x • f x) = fun x => g x • f x
⊢ Integrable (fun a => g a • K.indicator f a) μ

Proof state:
case hf
X : Type u_1
E : Type u_3
inst✝⁵ : MeasurableSpace X
inst✝⁴ : TopologicalSpace X
inst✝³ : NormedAddCommGroup E
f : X → E
μ : Measure X
inst✝² : NormedSpace ℝ E
inst✝¹ : OpensMeasurableSpace X
inst✝ : T2Space X
hf : LocallyIntegrable f μ
g : X → ℝ
hg : Continuous g
h'g : HasCompactSupport g
K : Set X := tsupport g
hK : IsCompact K
this : (K.indicator fun x => g x • f x) = fun x => g x • f x
⊢ Integrable (K.indicator f) μ

Tactic:
rw [integrable_indicator_iff hK.measurableSet]

Result:
case hf
X : Type u_1
E : Type u_3
inst✝⁵ : MeasurableSpace X
inst✝⁴ : TopologicalSpace X
inst✝³ : NormedAddCommGroup E
f : X → E
μ : Measure X
inst✝² : NormedSpace ℝ E
inst✝¹ : OpensMeasurableSpace X
inst✝ : T2Space X
hf : LocallyIntegrable f μ
g : X → ℝ
hg : Continuous g
h'g : HasCompactSupport g
K : Set X := tsupport g
hK : IsCompact K
this : (K.indicator fun x => g x • f x) = fun x => g x • f x
⊢ IntegrableOn f K μ

Proof state:
case hf
X : Type u_1
E : Type u_3
inst✝⁵ : MeasurableSpace X
inst✝⁴ : TopologicalSpace X
inst✝³ : NormedAddCommGroup E
f : X → E
μ : Measure X
inst✝² : NormedSpace ℝ E
inst✝¹ : OpensMeasurableSpace X
inst✝ : T2Space X
hf : LocallyIntegrable f μ
g : X → ℝ
hg : Continuous g
h'g : HasCompactSupport g
K : Set X := tsupport g
hK : IsCompact K
this : (K.indicator fun x => g x • f x) = fun x => g x • f x
⊢ IntegrableOn f K μ

Tactic:
exact hf.integrableOn_isCompact hK

Result:
no goals

Proof state:
X : Type u_1
E : Type u_3
inst✝⁵ : MeasurableSpace X
inst✝⁴ : TopologicalSpace X
inst✝³ : NormedAddCommGroup E
f : X → E
μ : Measure X
inst✝² : NormedSpace ℝ E
inst✝¹ : OpensMeasurableSpace X
inst✝ : T2Space X
hf : LocallyIntegrable f μ
g : X → ℝ
hg : Continuous g
h'g : HasCompactSupport g
K : Set X := tsupport g
hK : IsCompact K
⊢ (support fun x => g x • f x) ⊆ K

Tactic:
apply support_subset_iff'.2

Result:
X : Type u_1
E : Type u_3
inst✝⁵ : MeasurableSpace X
inst✝⁴ : TopologicalSpace X
inst✝³ : NormedAddCommGroup E
f : X → E
μ : Measure X
inst✝² : NormedSpace ℝ E
inst✝¹ : OpensMeasurableSpace X
inst✝ : T2Space X
hf : LocallyIntegrable f μ
g : X → ℝ
hg : Continuous g
h'g : HasCompactSupport g
K : Set X := tsupport g
hK : IsCompact K
⊢ ∀ x ∉ K, g x • f x = 0

Proof state:
X : Type u_1
E : Type u_3
inst✝⁵ : MeasurableSpace X
inst✝⁴ : TopologicalSpace X
inst✝³ : NormedAddCommGroup E
f : X → E
μ : Measure X
inst✝² : NormedSpace ℝ E
inst✝¹ : OpensMeasurableSpace X
inst✝ : T2Space X
hf : LocallyIntegrable f μ
g : X → ℝ
hg : Continuous g
h'g : HasCompactSupport g
K : Set X := tsupport g
hK : IsCompact K
this : (K.indicator fun x => g x • f x) = fun x => g x • f x
⊢ Integrable (fun a => g a • K.indicator f a) μ

Tactic:
apply Integrable.smul_of_top_right

Result:
case hf
X : Type u_1
E : Type u_3
inst✝⁵ : MeasurableSpace X
inst✝⁴ : TopologicalSpace X
inst✝³ : NormedAddCommGroup E
f : X → E
μ : Measure X
inst✝² : NormedSpace ℝ E
inst✝¹ : OpensMeasurableSpace X
inst✝ : T2Space X
hf : LocallyIntegrable f μ
g : X → ℝ
hg : Continuous g
h'g : HasCompactSupport g
K : Set X := tsupport g
hK : IsCompact K
this : (K.indicator fun x => g x • f x) = fun x => g x • f x
⊢ Integrable (K.indicator f) μ

case hφ
X : Type u_1
E : Type u_3
inst✝⁵ : MeasurableSpace X
inst✝⁴ : TopologicalSpace X
inst✝³ : NormedAddCommGroup E
f : X → E
μ : Measure X
inst✝² : NormedSpace ℝ E
inst✝¹ : OpensMeasurableSpace X
inst✝ : T2Space X
hf : LocallyIntegrable f μ
g : X → ℝ
hg : Continuous g
h'g : HasCompactSupport g
K : Set X := tsupport g
hK : IsCompact K
this : (K.indicator fun x => g x • f x) = fun x => g x • f x
⊢ MemLp g ⊤ μ

Proof state:
X : Type u_1
E : Type u_3
inst✝⁵ : MeasurableSpace X
inst✝⁴ : TopologicalSpace X
inst✝³ : NormedAddCommGroup E
f : X → E
μ : Measure X
inst✝² : NormedSpace ℝ E
inst✝¹ : OpensMeasurableSpace X
inst✝ : T2Space X
hf : LocallyIntegrable f μ
g : X → ℝ
hg : Continuous g
h'g : HasCompactSupport g
K : Set X := tsupport g
⊢ Integrable (fun x => g x • f x) μ

Tactic:
have hK : IsCompact K := h'g

Result:
X : Type u_1
E : Type u_3
inst✝⁵ : MeasurableSpace X
inst✝⁴ : TopologicalSpace X
inst✝³ : NormedAddCommGroup E
f : X → E
μ : Measure X
inst✝² : NormedSpace ℝ E
inst✝¹ : OpensMeasurableSpace X
inst✝ : T2Space X
hf : LocallyIntegrable f μ
g : X → ℝ
hg : Continuous g
h'g : HasCompactSupport g
K : Set X := tsupport g
hK : IsCompact K
⊢ Integrable (fun x => g x • f x) μ

Proof state:
X : Type u_1
E : Type u_3
inst✝⁵ : MeasurableSpace X
inst✝⁴ : TopologicalSpace X
inst✝³ : NormedAddCommGroup E
f : X → E
μ : Measure X
inst✝² : NormedSpace ℝ E
inst✝¹ : OpensMeasurableSpace X
inst✝ : T2Space X
hf : LocallyIntegrable f μ
g : X → ℝ
hg : Continuous g
h'g : HasCompactSupport g
K : Set X := tsupport g
hK : IsCompact K
⊢ (K.indicator fun x => g x • f x) = fun x => g x • f x

Tactic:
apply indicator_eq_self.2

Result:
X : Type u_1
E : Type u_3
inst✝⁵ : MeasurableSpace X
inst✝⁴ : TopologicalSpace X
inst✝³ : NormedAddCommGroup E
f : X → E
μ : Measure X
inst✝² : NormedSpace ℝ E
inst✝¹ : OpensMeasurableSpace X
inst✝ : T2Space X
hf : LocallyIntegrable f μ
g : X → ℝ
hg : Continuous g
h'g : HasCompactSupport g
K : Set X := tsupport g
hK : IsCompact K
⊢ (support fun x => g x • f x) ⊆ K

Proof state:
X : Type u_1
E : Type u_3
inst✝⁵ : MeasurableSpace X
inst✝⁴ : TopologicalSpace X
inst✝³ : NormedAddCommGroup E
f : X → E
μ : Measure X
inst✝² : NormedSpace ℝ E
inst✝¹ : OpensMeasurableSpace X
inst✝ : T2Space X
hf : LocallyIntegrable f μ
g : X → ℝ
hg : Continuous g
h'g : HasCompactSupport g
K : Set X := tsupport g
hK : IsCompact K
⊢ Integrable (fun x => g x • f x) μ

Tactic:
have : K.indicator (fun x ↦ g x • f x) = (fun x ↦ g x • f x) := by
  apply indicator_eq_self.2
  apply support_subset_iff'.2
  intros x hx
  simp [image_eq_zero_of_nmem_tsupport hx]

Result:
X : Type u_1
E : Type u_3
inst✝⁵ : MeasurableSpace X
inst✝⁴ : TopologicalSpace X
inst✝³ : NormedAddCommGroup E
f : X → E
μ : Measure X
inst✝² : NormedSpace ℝ E
inst✝¹ : OpensMeasurableSpace X
inst✝ : T2Space X
hf : LocallyIntegrable f μ
g : X → ℝ
hg : Continuous g
h'g : HasCompactSupport g
K : Set X := tsupport g
hK : IsCompact K
this : (K.indicator fun x => g x • f x) = fun x => g x • f x
⊢ Integrable (fun x => g x • f x) μ