l3lab/ntp-mathlib huggingface dataset:
theorem LocallyIntegrable.indicator (hf : LocallyIntegrable f μ) {s : Set X}
    (hs : MeasurableSet s) : LocallyIntegrable (s.indicator f) μ := by
  

Proof state:
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
R : Type u_5
inst✝⁵ : MeasurableSpace X
inst✝⁴ : TopologicalSpace X
inst✝³ : MeasurableSpace Y
inst✝² : TopologicalSpace Y
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
f g : X → E
μ : Measure X
s✝ : Set X
hf : LocallyIntegrable f
s : Set X
hs : MeasurableSet s
⊢ LocallyIntegrable (Set.indicator s f)

Next tactic:
intro x
theorem LocallyIntegrable.indicator (hf : LocallyIntegrable f μ) {s : Set X}
    (hs : MeasurableSet s) : LocallyIntegrable (s.indicator f) μ := by
  intro x
  

Proof state:
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
R : Type u_5
inst✝⁵ : MeasurableSpace X
inst✝⁴ : TopologicalSpace X
inst✝³ : MeasurableSpace Y
inst✝² : TopologicalSpace Y
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
f g : X → E
μ : Measure X
s✝ : Set X
hf : LocallyIntegrable f
s : Set X
hs : MeasurableSet s
x : X
⊢ IntegrableAtFilter (Set.indicator s f) (𝓝 x)

Next tactic:
rcases hf x with ⟨U, hU, h'U⟩
theorem LocallyIntegrable.indicator (hf : LocallyIntegrable f μ) {s : Set X}
    (hs : MeasurableSet s) : LocallyIntegrable (s.indicator f) μ := by
  intro x
  rcases hf x with ⟨U, hU, h'U⟩
  

Proof state:
case intro.intro
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
R : Type u_5
inst✝⁵ : MeasurableSpace X
inst✝⁴ : TopologicalSpace X
inst✝³ : MeasurableSpace Y
inst✝² : TopologicalSpace Y
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
f g : X → E
μ : Measure X
s✝ : Set X
hf : LocallyIntegrable f
s : Set X
hs : MeasurableSet s
x : X
U : Set X
hU : U ∈ 𝓝 x
h'U : IntegrableOn f U
⊢ IntegrableAtFilter (Set.indicator s f) (𝓝 x)

Next tactic:
exact ⟨U, hU, h'U.indicator hs⟩
theorem locallyIntegrable_map_homeomorph [BorelSpace X] [BorelSpace Y] (e : X ≃ₜ Y) {f : Y → E}
    {μ : Measure X} : LocallyIntegrable f (Measure.map e μ) ↔ LocallyIntegrable (f ∘ e) μ := by
  

Proof state:
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
R : Type u_5
inst✝⁷ : MeasurableSpace X
inst✝⁶ : TopologicalSpace X
inst✝⁵ : MeasurableSpace Y
inst✝⁴ : TopologicalSpace Y
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
f✝ g : X → E
μ✝ : Measure X
s : Set X
inst✝¹ : BorelSpace X
inst✝ : BorelSpace Y
e : X ≃ₜ Y
f : Y → E
μ : Measure X
⊢ LocallyIntegrable f ↔ LocallyIntegrable (f ∘ ⇑e)

Next tactic:
refine' ⟨fun h x => _, fun h x => _⟩
theorem locallyIntegrable_map_homeomorph [BorelSpace X] [BorelSpace Y] (e : X ≃ₜ Y) {f : Y → E}
    {μ : Measure X} : LocallyIntegrable f (Measure.map e μ) ↔ LocallyIntegrable (f ∘ e) μ := by
  refine' ⟨fun h x => _, fun h x => _⟩
  · 

Proof state:
case refine'_1
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
R : Type u_5
inst✝⁷ : MeasurableSpace X
inst✝⁶ : TopologicalSpace X
inst✝⁵ : MeasurableSpace Y
inst✝⁴ : TopologicalSpace Y
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
f✝ g : X → E
μ✝ : Measure X
s : Set X
inst✝¹ : BorelSpace X
inst✝ : BorelSpace Y
e : X ≃ₜ Y
f : Y → E
μ : Measure X
h : LocallyIntegrable f
x : X
⊢ IntegrableAtFilter (f ∘ ⇑e) (𝓝 x)

Next tactic:
rcases h (e x) with ⟨U, hU, h'U⟩
theorem locallyIntegrable_map_homeomorph [BorelSpace X] [BorelSpace Y] (e : X ≃ₜ Y) {f : Y → E}
    {μ : Measure X} : LocallyIntegrable f (Measure.map e μ) ↔ LocallyIntegrable (f ∘ e) μ := by
  refine' ⟨fun h x => _, fun h x => _⟩
  · rcases h (e x) with ⟨U, hU, h'U⟩
    

Proof state:
case refine'_1.intro.intro
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
R : Type u_5
inst✝⁷ : MeasurableSpace X
inst✝⁶ : TopologicalSpace X
inst✝⁵ : MeasurableSpace Y
inst✝⁴ : TopologicalSpace Y
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
f✝ g : X → E
μ✝ : Measure X
s : Set X
inst✝¹ : BorelSpace X
inst✝ : BorelSpace Y
e : X ≃ₜ Y
f : Y → E
μ : Measure X
h : LocallyIntegrable f
x : X
U : Set Y
hU : U ∈ 𝓝 (e x)
h'U : IntegrableOn f U
⊢ IntegrableAtFilter (f ∘ ⇑e) (𝓝 x)

Next tactic:
refine' ⟨e ⁻¹' U, e.continuous.continuousAt.preimage_mem_nhds hU, _⟩
theorem locallyIntegrable_map_homeomorph [BorelSpace X] [BorelSpace Y] (e : X ≃ₜ Y) {f : Y → E}
    {μ : Measure X} : LocallyIntegrable f (Measure.map e μ) ↔ LocallyIntegrable (f ∘ e) μ := by
  refine' ⟨fun h x => _, fun h x => _⟩
  · rcases h (e x) with ⟨U, hU, h'U⟩
    refine' ⟨e ⁻¹' U, e.continuous.continuousAt.preimage_mem_nhds hU, _⟩
    

Proof state:
case refine'_1.intro.intro
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
R : Type u_5
inst✝⁷ : MeasurableSpace X
inst✝⁶ : TopologicalSpace X
inst✝⁵ : MeasurableSpace Y
inst✝⁴ : TopologicalSpace Y
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
f✝ g : X → E
μ✝ : Measure X
s : Set X
inst✝¹ : BorelSpace X
inst✝ : BorelSpace Y
e : X ≃ₜ Y
f : Y → E
μ : Measure X
h : LocallyIntegrable f
x : X
U : Set Y
hU : U ∈ 𝓝 (e x)
h'U : IntegrableOn f U
⊢ IntegrableOn (f ∘ ⇑e) (⇑e ⁻¹' U)

Next tactic:
exact (integrableOn_map_equiv e.toMeasurableEquiv).1 h'U
theorem locallyIntegrable_map_homeomorph [BorelSpace X] [BorelSpace Y] (e : X ≃ₜ Y) {f : Y → E}
    {μ : Measure X} : LocallyIntegrable f (Measure.map e μ) ↔ LocallyIntegrable (f ∘ e) μ := by
  refine' ⟨fun h x => _, fun h x => _⟩
  · rcases h (e x) with ⟨U, hU, h'U⟩
    refine' ⟨e ⁻¹' U, e.continuous.continuousAt.preimage_mem_nhds hU, _⟩
    exact (integrableOn_map_equiv e.toMeasurableEquiv).1 h'U
  · 

Proof state:
case refine'_2
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
R : Type u_5
inst✝⁷ : MeasurableSpace X
inst✝⁶ : TopologicalSpace X
inst✝⁵ : MeasurableSpace Y
inst✝⁴ : TopologicalSpace Y
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
f✝ g : X → E
μ✝ : Measure X
s : Set X
inst✝¹ : BorelSpace X
inst✝ : BorelSpace Y
e : X ≃ₜ Y
f : Y → E
μ : Measure X
h : LocallyIntegrable (f ∘ ⇑e)
x : Y
⊢ IntegrableAtFilter f (𝓝 x)

Next tactic:
rcases h (e.symm x) with ⟨U, hU, h'U⟩
theorem locallyIntegrable_map_homeomorph [BorelSpace X] [BorelSpace Y] (e : X ≃ₜ Y) {f : Y → E}
    {μ : Measure X} : LocallyIntegrable f (Measure.map e μ) ↔ LocallyIntegrable (f ∘ e) μ := by
  refine' ⟨fun h x => _, fun h x => _⟩
  · rcases h (e x) with ⟨U, hU, h'U⟩
    refine' ⟨e ⁻¹' U, e.continuous.continuousAt.preimage_mem_nhds hU, _⟩
    exact (integrableOn_map_equiv e.toMeasurableEquiv).1 h'U
  · rcases h (e.symm x) with ⟨U, hU, h'U⟩
    

Proof state:
case refine'_2.intro.intro
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
R : Type u_5
inst✝⁷ : MeasurableSpace X
inst✝⁶ : TopologicalSpace X
inst✝⁵ : MeasurableSpace Y
inst✝⁴ : TopologicalSpace Y
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
f✝ g : X → E
μ✝ : Measure X
s : Set X
inst✝¹ : BorelSpace X
inst✝ : BorelSpace Y
e : X ≃ₜ Y
f : Y → E
μ : Measure X
h : LocallyIntegrable (f ∘ ⇑e)
x : Y
U : Set X
hU : U ∈ 𝓝 ((Homeomorph.symm e) x)
h'U : IntegrableOn (f ∘ ⇑e) U
⊢ IntegrableAtFilter f (𝓝 x)

Next tactic:
refine' ⟨e.symm ⁻¹' U, e.symm.continuous.continuousAt.preimage_mem_nhds hU, _⟩
theorem locallyIntegrable_map_homeomorph [BorelSpace X] [BorelSpace Y] (e : X ≃ₜ Y) {f : Y → E}
    {μ : Measure X} : LocallyIntegrable f (Measure.map e μ) ↔ LocallyIntegrable (f ∘ e) μ := by
  refine' ⟨fun h x => _, fun h x => _⟩
  · rcases h (e x) with ⟨U, hU, h'U⟩
    refine' ⟨e ⁻¹' U, e.continuous.continuousAt.preimage_mem_nhds hU, _⟩
    exact (integrableOn_map_equiv e.toMeasurableEquiv).1 h'U
  · rcases h (e.symm x) with ⟨U, hU, h'U⟩
    refine' ⟨e.symm ⁻¹' U, e.symm.continuous.continuousAt.preimage_mem_nhds hU, _⟩
    

Proof state:
case refine'_2.intro.intro
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
R : Type u_5
inst✝⁷ : MeasurableSpace X
inst✝⁶ : TopologicalSpace X
inst✝⁵ : MeasurableSpace Y
inst✝⁴ : TopologicalSpace Y
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
f✝ g : X → E
μ✝ : Measure X
s : Set X
inst✝¹ : BorelSpace X
inst✝ : BorelSpace Y
e : X ≃ₜ Y
f : Y → E
μ : Measure X
h : LocallyIntegrable (f ∘ ⇑e)
x : Y
U : Set X
hU : U ∈ 𝓝 ((Homeomorph.symm e) x)
h'U : IntegrableOn (f ∘ ⇑e) U
⊢ IntegrableOn f (⇑(Homeomorph.symm e) ⁻¹' U)

Next tactic:
apply (integrableOn_map_equiv e.toMeasurableEquiv).2
theorem locallyIntegrable_map_homeomorph [BorelSpace X] [BorelSpace Y] (e : X ≃ₜ Y) {f : Y → E}
    {μ : Measure X} : LocallyIntegrable f (Measure.map e μ) ↔ LocallyIntegrable (f ∘ e) μ := by
  refine' ⟨fun h x => _, fun h x => _⟩
  · rcases h (e x) with ⟨U, hU, h'U⟩
    refine' ⟨e ⁻¹' U, e.continuous.continuousAt.preimage_mem_nhds hU, _⟩
    exact (integrableOn_map_equiv e.toMeasurableEquiv).1 h'U
  · rcases h (e.symm x) with ⟨U, hU, h'U⟩
    refine' ⟨e.symm ⁻¹' U, e.symm.continuous.continuousAt.preimage_mem_nhds hU, _⟩
    apply (integrableOn_map_equiv e.toMeasurableEquiv).2
    

Proof state:
case refine'_2.intro.intro
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
R : Type u_5
inst✝⁷ : MeasurableSpace X
inst✝⁶ : TopologicalSpace X
inst✝⁵ : MeasurableSpace Y
inst✝⁴ : TopologicalSpace Y
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
f✝ g : X → E
μ✝ : Measure X
s : Set X
inst✝¹ : BorelSpace X
inst✝ : BorelSpace Y
e : X ≃ₜ Y
f : Y → E
μ : Measure X
h : LocallyIntegrable (f ∘ ⇑e)
x : Y
U : Set X
hU : U ∈ 𝓝 ((Homeomorph.symm e) x)
h'U : IntegrableOn (f ∘ ⇑e) U
⊢ IntegrableOn (f ∘ ⇑(Homeomorph.toMeasurableEquiv e))
    (⇑(Homeomorph.toMeasurableEquiv e) ⁻¹' (⇑(Homeomorph.symm e) ⁻¹' U))

Next tactic:
simp only [Homeomorph.toMeasurableEquiv_coe]
theorem locallyIntegrable_map_homeomorph [BorelSpace X] [BorelSpace Y] (e : X ≃ₜ Y) {f : Y → E}
    {μ : Measure X} : LocallyIntegrable f (Measure.map e μ) ↔ LocallyIntegrable (f ∘ e) μ := by
  refine' ⟨fun h x => _, fun h x => _⟩
  · rcases h (e x) with ⟨U, hU, h'U⟩
    refine' ⟨e ⁻¹' U, e.continuous.continuousAt.preimage_mem_nhds hU, _⟩
    exact (integrableOn_map_equiv e.toMeasurableEquiv).1 h'U
  · rcases h (e.symm x) with ⟨U, hU, h'U⟩
    refine' ⟨e.symm ⁻¹' U, e.symm.continuous.continuousAt.preimage_mem_nhds hU, _⟩
    apply (integrableOn_map_equiv e.toMeasurableEquiv).2
    simp only [Homeomorph.toMeasurableEquiv_coe]
    

Proof state:
case refine'_2.intro.intro
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
R : Type u_5
inst✝⁷ : MeasurableSpace X
inst✝⁶ : TopologicalSpace X
inst✝⁵ : MeasurableSpace Y
inst✝⁴ : TopologicalSpace Y
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
f✝ g : X → E
μ✝ : Measure X
s : Set X
inst✝¹ : BorelSpace X
inst✝ : BorelSpace Y
e : X ≃ₜ Y
f : Y → E
μ : Measure X
h : LocallyIntegrable (f ∘ ⇑e)
x : Y
U : Set X
hU : U ∈ 𝓝 ((Homeomorph.symm e) x)
h'U : IntegrableOn (f ∘ ⇑e) U
⊢ IntegrableOn (f ∘ ⇑e) (⇑e ⁻¹' (⇑(Homeomorph.symm e) ⁻¹' U))

Next tactic:
convert h'U
theorem locallyIntegrable_map_homeomorph [BorelSpace X] [BorelSpace Y] (e : X ≃ₜ Y) {f : Y → E}
    {μ : Measure X} : LocallyIntegrable f (Measure.map e μ) ↔ LocallyIntegrable (f ∘ e) μ := by
  refine' ⟨fun h x => _, fun h x => _⟩
  · rcases h (e x) with ⟨U, hU, h'U⟩
    refine' ⟨e ⁻¹' U, e.continuous.continuousAt.preimage_mem_nhds hU, _⟩
    exact (integrableOn_map_equiv e.toMeasurableEquiv).1 h'U
  · rcases h (e.symm x) with ⟨U, hU, h'U⟩
    refine' ⟨e.symm ⁻¹' U, e.symm.continuous.continuousAt.preimage_mem_nhds hU, _⟩
    apply (integrableOn_map_equiv e.toMeasurableEquiv).2
    simp only [Homeomorph.toMeasurableEquiv_coe]
    convert h'U
    

Proof state:
case h.e'_6
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
R : Type u_5
inst✝⁷ : MeasurableSpace X
inst✝⁶ : TopologicalSpace X
inst✝⁵ : MeasurableSpace Y
inst✝⁴ : TopologicalSpace Y
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
f✝ g : X → E
μ✝ : Measure X
s : Set X
inst✝¹ : BorelSpace X
inst✝ : BorelSpace Y
e : X ≃ₜ Y
f : Y → E
μ : Measure X
h : LocallyIntegrable (f ∘ ⇑e)
x : Y
U : Set X
hU : U ∈ 𝓝 ((Homeomorph.symm e) x)
h'U : IntegrableOn (f ∘ ⇑e) U
⊢ ⇑e ⁻¹' (⇑(Homeomorph.symm e) ⁻¹' U) = U

Next tactic:
ext x
theorem locallyIntegrable_map_homeomorph [BorelSpace X] [BorelSpace Y] (e : X ≃ₜ Y) {f : Y → E}
    {μ : Measure X} : LocallyIntegrable f (Measure.map e μ) ↔ LocallyIntegrable (f ∘ e) μ := by
  refine' ⟨fun h x => _, fun h x => _⟩
  · rcases h (e x) with ⟨U, hU, h'U⟩
    refine' ⟨e ⁻¹' U, e.continuous.continuousAt.preimage_mem_nhds hU, _⟩
    exact (integrableOn_map_equiv e.toMeasurableEquiv).1 h'U
  · rcases h (e.symm x) with ⟨U, hU, h'U⟩
    refine' ⟨e.symm ⁻¹' U, e.symm.continuous.continuousAt.preimage_mem_nhds hU, _⟩
    apply (integrableOn_map_equiv e.toMeasurableEquiv).2
    simp only [Homeomorph.toMeasurableEquiv_coe]
    convert h'U
    ext x
    

Proof state:
case h.e'_6.h
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
R : Type u_5
inst✝⁷ : MeasurableSpace X
inst✝⁶ : TopologicalSpace X
inst✝⁵ : MeasurableSpace Y
inst✝⁴ : TopologicalSpace Y
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
f✝ g : X → E
μ✝ : Measure X
s : Set X
inst✝¹ : BorelSpace X
inst✝ : BorelSpace Y
e : X ≃ₜ Y
f : Y → E
μ : Measure X
h : LocallyIntegrable (f ∘ ⇑e)
x✝ : Y
U : Set X
hU : U ∈ 𝓝 ((Homeomorph.symm e) x✝)
h'U : IntegrableOn (f ∘ ⇑e) U
x : X
⊢ x ∈ ⇑e ⁻¹' (⇑(Homeomorph.symm e) ⁻¹' U) ↔ x ∈ U

Next tactic:
simp only [mem_preimage, Homeomorph.symm_apply_apply]
theorem locallyIntegrable_finset_sum {ι} (s : Finset ι) {f : ι → X → E}
    (hf : ∀ i ∈ s, LocallyIntegrable (f i) μ) : LocallyIntegrable (fun a ↦ ∑ i in s, f i a) μ := by
  

Proof state:
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
R : Type u_5
inst✝⁵ : MeasurableSpace X
inst✝⁴ : TopologicalSpace X
inst✝³ : MeasurableSpace Y
inst✝² : TopologicalSpace Y
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
f✝ g : X → E
μ : Measure X
s✝ : Set X
ι : Type u_6
s : Finset ι
f : ι → X → E
hf : ∀ i ∈ s, LocallyIntegrable (f i)
⊢ LocallyIntegrable fun a => ∑ i in s, f i a

Next tactic:
simpa only [← Finset.sum_apply] using locallyIntegrable_finset_sum' s hf
/-- If `f` is locally integrable and `g` is continuous with compact support,
then `g • f` is integrable. -/
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) μ := by
  

Proof state:
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
R : Type u_5
inst✝⁸ : MeasurableSpace X
inst✝⁷ : TopologicalSpace X
inst✝⁶ : MeasurableSpace Y
inst✝⁵ : TopologicalSpace Y
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
f g✝ : X → E
μ : Measure X
s : Set X
inst✝² : NormedSpace ℝ E
inst✝¹ : OpensMeasurableSpace X
inst✝ : T2Space X
hf : LocallyIntegrable f
g : X → ℝ
hg : Continuous g
h'g : HasCompactSupport g
⊢ Integrable fun x => g x • f x

Next tactic:
let K := tsupport g
/-- If `f` is locally integrable and `g` is continuous with compact support,
then `g • f` is integrable. -/
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) μ := by
  let K := tsupport g
  

Proof state:
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
R : Type u_5
inst✝⁸ : MeasurableSpace X
inst✝⁷ : TopologicalSpace X
inst✝⁶ : MeasurableSpace Y
inst✝⁵ : TopologicalSpace Y
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
f g✝ : X → E
μ : Measure X
s : Set 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

Next tactic:
have hK : IsCompact K := h'g
/-- If `f` is locally integrable and `g` is continuous with compact support,
then `g • f` is integrable. -/
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) μ := by
  let K := tsupport g
  have hK : IsCompact K := h'g
  

Proof state:
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
R : Type u_5
inst✝⁸ : MeasurableSpace X
inst✝⁷ : TopologicalSpace X
inst✝⁶ : MeasurableSpace Y
inst✝⁵ : TopologicalSpace Y
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
f g✝ : X → E
μ : Measure X
s : Set 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

Next 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]
/-- If `f` is locally integrable and `g` is continuous with compact support,
then `g • f` is integrable. -/
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) μ := by
  let K := tsupport g
  have hK : IsCompact K := h'g
  have : K.indicator (fun x ↦ g x • f x) = (fun x ↦ g x • f x) := by
    

Proof state:
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
R : Type u_5
inst✝⁸ : MeasurableSpace X
inst✝⁷ : TopologicalSpace X
inst✝⁶ : MeasurableSpace Y
inst✝⁵ : TopologicalSpace Y
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
f g✝ : X → E
μ : Measure X
s : Set 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
⊢ (Set.indicator K fun x => g x • f x) = fun x => g x • f x

Next tactic:
apply indicator_eq_self.2
/-- If `f` is locally integrable and `g` is continuous with compact support,
then `g • f` is integrable. -/
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) μ := by
  let K := tsupport g
  have hK : IsCompact K := h'g
  have : K.indicator (fun x ↦ g x • f x) = (fun x ↦ g x • f x) := by
    apply indicator_eq_self.2
    

Proof state:
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
R : Type u_5
inst✝⁸ : MeasurableSpace X
inst✝⁷ : TopologicalSpace X
inst✝⁶ : MeasurableSpace Y
inst✝⁵ : TopologicalSpace Y
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
f g✝ : X → E
μ : Measure X
s : Set 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

Next tactic:
apply support_subset_iff'.2
/-- If `f` is locally integrable and `g` is continuous with compact support,
then `g • f` is integrable. -/
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) μ := by
  let K := tsupport g
  have hK : IsCompact K := h'g
  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
    

Proof state:
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
R : Type u_5
inst✝⁸ : MeasurableSpace X
inst✝⁷ : TopologicalSpace X
inst✝⁶ : MeasurableSpace Y
inst✝⁵ : TopologicalSpace Y
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
f g✝ : X → E
μ : Measure X
s : Set 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

Next tactic:
intros x hx
/-- If `f` is locally integrable and `g` is continuous with compact support,
then `g • f` is integrable. -/
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) μ := by
  let K := tsupport g
  have hK : IsCompact K := h'g
  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
    

Proof state:
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
R : Type u_5
inst✝⁸ : MeasurableSpace X
inst✝⁷ : TopologicalSpace X
inst✝⁶ : MeasurableSpace Y
inst✝⁵ : TopologicalSpace Y
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
f g✝ : X → E
μ : Measure X
s : Set 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

Next tactic:
simp [image_eq_zero_of_nmem_tsupport hx]
/-- If `f` is locally integrable and `g` is continuous with compact support,
then `g • f` is integrable. -/
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) μ := by
  let K := tsupport g
  have hK : IsCompact K := h'g
  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]
  

Proof state:
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
R : Type u_5
inst✝⁸ : MeasurableSpace X
inst✝⁷ : TopologicalSpace X
inst✝⁶ : MeasurableSpace Y
inst✝⁵ : TopologicalSpace Y
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
f g✝ : X → E
μ : Measure X
s : Set 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 : (Set.indicator K fun x => g x • f x) = fun x => g x • f x
⊢ Integrable fun x => g x • f x

Next tactic:
rw [← this, indicator_smul]
/-- If `f` is locally integrable and `g` is continuous with compact support,
then `g • f` is integrable. -/
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) μ := by
  let K := tsupport g
  have hK : IsCompact K := h'g
  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]
  rw [← this, indicator_smul]
  

Proof state:
X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
R : Type u_5
inst✝⁸ : MeasurableSpace X
inst✝⁷ : TopologicalSpace X
inst✝⁶ : MeasurableSpace Y
inst✝⁵ : TopologicalSpace Y
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
f g✝ : X → E
μ : Measure X
s : Set 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 : (Set.indicator K fun x => g x • f x) = fun x => g x • f x
⊢ Integrable fun a => g a • Set.indicator K (fun x => f x) a

Next tactic:
apply Integrable.smul_of_top_right