Theorem: MeasureTheory.setIntegral_tilted'
File: Mathlib/MeasureTheory/Measure/Tilted.lean

tactic: by_cases hf : AEMeasurable f μ
state_before: α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ : α → ℝ
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ
g : α → E
s : Set α
hs : MeasurableSet s
⊢ ∫ (x : α) in s, g x ∂μ.tilted f = ∫ (x : α) in s, (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) • g x ∂μ
state_after: case pos
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ : α → ℝ
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ
g : α → E
s : Set α
hs : MeasurableSet s
hf : AEMeasurable f μ
⊢ ∫ (x : α) in s, g x ∂μ.tilted f = ∫ (x : α) in s, (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) • g x ∂μ

case neg
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ : α → ℝ
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ
g : α → E
s : Set α
hs : MeasurableSet s
hf : ¬AEMeasurable f μ
⊢ ∫ (x : α) in s, g x ∂μ.tilted f = ∫ (x : α) in s, (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) • g x ∂μ

tactic: rw [tilted_eq_withDensity_nnreal, setIntegral_withDensity_eq_setIntegral_smul₀ _ _ hs]
state_before: case pos
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ : α → ℝ
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ
g : α → E
s : Set α
hs : MeasurableSet s
hf : AEMeasurable f μ
⊢ ∫ (x : α) in s, g x ∂μ.tilted f = ∫ (x : α) in s, (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) • g x ∂μ
state_after: case pos
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ : α → ℝ
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ
g : α → E
s : Set α
hs : MeasurableSet s
hf : AEMeasurable f μ
⊢ ∫ (x : α) in s, ⟨rexp (f x) / ∫ (x : α), rexp (f x) ∂μ, ⋯⟩ • g x ∂μ =
    ∫ (x : α) in s, (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) • g x ∂μ

α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ : α → ℝ
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ
g : α → E
s : Set α
hs : MeasurableSet s
hf : AEMeasurable f μ
⊢ AEMeasurable (fun x => ⟨rexp (f x) / ∫ (x : α), rexp (f x) ∂μ, ⋯⟩) (μ.restrict s)

tactic: congr
state_before: case pos
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ : α → ℝ
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ
g : α → E
s : Set α
hs : MeasurableSet s
hf : AEMeasurable f μ
⊢ ∫ (x : α) in s, ⟨rexp (f x) / ∫ (x : α), rexp (f x) ∂μ, ⋯⟩ • g x ∂μ =
    ∫ (x : α) in s, (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) • g x ∂μ
state_after: no goals

tactic: suffices AEMeasurable (fun x ↦ exp (f x) / ∫ x, exp (f x) ∂μ) μ by
  rw [← aemeasurable_coe_nnreal_real_iff]
  refine AEMeasurable.restrict ?_
  simpa only [NNReal.coe_mk]
state_before: α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ : α → ℝ
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ
g : α → E
s : Set α
hs : MeasurableSet s
hf : AEMeasurable f μ
⊢ AEMeasurable (fun x => ⟨rexp (f x) / ∫ (x : α), rexp (f x) ∂μ, ⋯⟩) (μ.restrict s)
state_after: α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ : α → ℝ
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ
g : α → E
s : Set α
hs : MeasurableSet s
hf : AEMeasurable f μ
⊢ AEMeasurable (fun x => rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) μ

tactic: exact (measurable_exp.comp_aemeasurable hf).div_const _
state_before: α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ : α → ℝ
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ
g : α → E
s : Set α
hs : MeasurableSet s
hf : AEMeasurable f μ
⊢ AEMeasurable (fun x => rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) μ
state_after: no goals

tactic: rw [← aemeasurable_coe_nnreal_real_iff]
state_before: α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ : α → ℝ
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ
g : α → E
s : Set α
hs : MeasurableSet s
hf : AEMeasurable f μ
this : AEMeasurable (fun x => rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) μ
⊢ AEMeasurable (fun x => ⟨rexp (f x) / ∫ (x : α), rexp (f x) ∂μ, ⋯⟩) (μ.restrict s)
state_after: α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ : α → ℝ
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ
g : α → E
s : Set α
hs : MeasurableSet s
hf : AEMeasurable f μ
this : AEMeasurable (fun x => rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) μ
⊢ AEMeasurable (fun x => ↑⟨rexp (f x) / ∫ (x : α), rexp (f x) ∂μ, ⋯⟩) (μ.restrict s)

tactic: refine AEMeasurable.restrict ?_
state_before: α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ : α → ℝ
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ
g : α → E
s : Set α
hs : MeasurableSet s
hf : AEMeasurable f μ
this : AEMeasurable (fun x => rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) μ
⊢ AEMeasurable (fun x => ↑⟨rexp (f x) / ∫ (x : α), rexp (f x) ∂μ, ⋯⟩) (μ.restrict s)
state_after: α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ : α → ℝ
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ
g : α → E
s : Set α
hs : MeasurableSet s
hf : AEMeasurable f μ
this : AEMeasurable (fun x => rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) μ
⊢ AEMeasurable (fun x => ↑⟨rexp (f x) / ∫ (x : α), rexp (f x) ∂μ, ⋯⟩) μ

tactic: simpa only [NNReal.coe_mk]
state_before: α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ : α → ℝ
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ
g : α → E
s : Set α
hs : MeasurableSet s
hf : AEMeasurable f μ
this : AEMeasurable (fun x => rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) μ
⊢ AEMeasurable (fun x => ↑⟨rexp (f x) / ∫ (x : α), rexp (f x) ∂μ, ⋯⟩) μ
state_after: no goals

tactic: have hf' : ¬ Integrable (fun x ↦ exp (f x)) μ := by
  exact fun h ↦ hf (aemeasurable_of_aemeasurable_exp h.1.aemeasurable)
state_before: case neg
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ : α → ℝ
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ
g : α → E
s : Set α
hs : MeasurableSet s
hf : ¬AEMeasurable f μ
⊢ ∫ (x : α) in s, g x ∂μ.tilted f = ∫ (x : α) in s, (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) • g x ∂μ
state_after: case neg
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ : α → ℝ
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ
g : α → E
s : Set α
hs : MeasurableSet s
hf : ¬AEMeasurable f μ
hf' : ¬Integrable (fun x => rexp (f x)) μ
⊢ ∫ (x : α) in s, g x ∂μ.tilted f = ∫ (x : α) in s, (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) • g x ∂μ

tactic: simp only [hf, not_false_eq_true, tilted_of_not_aemeasurable, Measure.restrict_zero,
  integral_zero_measure]
state_before: case neg
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ : α → ℝ
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ
g : α → E
s : Set α
hs : MeasurableSet s
hf : ¬AEMeasurable f μ
hf' : ¬Integrable (fun x => rexp (f x)) μ
⊢ ∫ (x : α) in s, g x ∂μ.tilted f = ∫ (x : α) in s, (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) • g x ∂μ
state_after: case neg
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ : α → ℝ
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ
g : α → E
s : Set α
hs : MeasurableSet s
hf : ¬AEMeasurable f μ
hf' : ¬Integrable (fun x => rexp (f x)) μ
⊢ 0 = ∫ (x : α) in s, (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) • g x ∂μ

tactic: rw [integral_undef hf']
state_before: case neg
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ : α → ℝ
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ
g : α → E
s : Set α
hs : MeasurableSet s
hf : ¬AEMeasurable f μ
hf' : ¬Integrable (fun x => rexp (f x)) μ
⊢ 0 = ∫ (x : α) in s, (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) • g x ∂μ
state_after: case neg
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ : α → ℝ
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ
g : α → E
s : Set α
hs : MeasurableSet s
hf : ¬AEMeasurable f μ
hf' : ¬Integrable (fun x => rexp (f x)) μ
⊢ 0 = ∫ (x : α) in s, (rexp (f x) / 0) • g x ∂μ

tactic: simp
state_before: case neg
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ : α → ℝ
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ
g : α → E
s : Set α
hs : MeasurableSet s
hf : ¬AEMeasurable f μ
hf' : ¬Integrable (fun x => rexp (f x)) μ
⊢ 0 = ∫ (x : α) in s, (rexp (f x) / 0) • g x ∂μ
state_after: no goals

tactic: exact fun h ↦ hf (aemeasurable_of_aemeasurable_exp h.1.aemeasurable)
state_before: α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ : α → ℝ
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : α → ℝ
g : α → E
s : Set α
hs : MeasurableSet s
hf : ¬AEMeasurable f μ
⊢ ¬Integrable (fun x => rexp (f x)) μ
state_after: no goals