Theorem: MeasureTheory.integral_exp_tilted
File: Mathlib/MeasureTheory/Measure/Tilted.lean

tactic: cases eq_zero_or_neZero μ with
| inl h => rw [h]; simp
| inr h0 =>
  rw [integral_tilted f]
  simp_rw [smul_eq_mul]
  have : ∀ x, (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * rexp (g x)
      = (rexp ((f + g) x) / ∫ (x : α), rexp (f x) ∂μ) := by
    intro x
    rw [Pi.add_apply, exp_add]
    ring
  simp_rw [this, div_eq_mul_inv]
  rw [integral_mul_right]
state_before: α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ f g : α → ℝ
⊢ ∫ (x : α), rexp (g x) ∂μ.tilted f = (∫ (x : α), rexp ((f + g) x) ∂μ) / ∫ (x : α), rexp (f x) ∂μ
state_after: no goals

tactic: rw [h]
state_before: case inl
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ f g : α → ℝ
h : μ = 0
⊢ ∫ (x : α), rexp (g x) ∂μ.tilted f = (∫ (x : α), rexp ((f + g) x) ∂μ) / ∫ (x : α), rexp (f x) ∂μ
state_after: case inl
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ f g : α → ℝ
h : μ = 0
⊢ ∫ (x : α), rexp (g x) ∂Measure.tilted 0 f = (∫ (x : α), rexp ((f + g) x) ∂0) / ∫ (x : α), rexp (f x) ∂0

tactic: simp
state_before: case inl
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ f g : α → ℝ
h : μ = 0
⊢ ∫ (x : α), rexp (g x) ∂Measure.tilted 0 f = (∫ (x : α), rexp ((f + g) x) ∂0) / ∫ (x : α), rexp (f x) ∂0
state_after: no goals

tactic: rw [integral_tilted f]
state_before: case inr
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ f g : α → ℝ
h0 : NeZero μ
⊢ ∫ (x : α), rexp (g x) ∂μ.tilted f = (∫ (x : α), rexp ((f + g) x) ∂μ) / ∫ (x : α), rexp (f x) ∂μ
state_after: case inr
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ f g : α → ℝ
h0 : NeZero μ
⊢ ∫ (x : α), (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) • rexp (g x) ∂μ =
    (∫ (x : α), rexp ((f + g) x) ∂μ) / ∫ (x : α), rexp (f x) ∂μ

tactic: simp_rw [smul_eq_mul]
state_before: case inr
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ f g : α → ℝ
h0 : NeZero μ
⊢ ∫ (x : α), (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) • rexp (g x) ∂μ =
    (∫ (x : α), rexp ((f + g) x) ∂μ) / ∫ (x : α), rexp (f x) ∂μ
state_after: case inr
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ f g : α → ℝ
h0 : NeZero μ
⊢ ∫ (x : α), (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * rexp (g x) ∂μ =
    (∫ (x : α), rexp ((f + g) x) ∂μ) / ∫ (x : α), rexp (f x) ∂μ

tactic: have : ∀ x, (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * rexp (g x)
    = (rexp ((f + g) x) / ∫ (x : α), rexp (f x) ∂μ) := by
  intro x
  rw [Pi.add_apply, exp_add]
  ring
state_before: case inr
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ f g : α → ℝ
h0 : NeZero μ
⊢ ∫ (x : α), (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * rexp (g x) ∂μ =
    (∫ (x : α), rexp ((f + g) x) ∂μ) / ∫ (x : α), rexp (f x) ∂μ
state_after: case inr
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ f g : α → ℝ
h0 : NeZero μ
this : ∀ (x : α), (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * rexp (g x) = rexp ((f + g) x) / ∫ (x : α), rexp (f x) ∂μ
⊢ ∫ (x : α), (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * rexp (g x) ∂μ =
    (∫ (x : α), rexp ((f + g) x) ∂μ) / ∫ (x : α), rexp (f x) ∂μ

tactic: simp_rw [this, div_eq_mul_inv]
state_before: case inr
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ f g : α → ℝ
h0 : NeZero μ
this : ∀ (x : α), (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * rexp (g x) = rexp ((f + g) x) / ∫ (x : α), rexp (f x) ∂μ
⊢ ∫ (x : α), (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * rexp (g x) ∂μ =
    (∫ (x : α), rexp ((f + g) x) ∂μ) / ∫ (x : α), rexp (f x) ∂μ
state_after: case inr
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ f g : α → ℝ
h0 : NeZero μ
this : ∀ (x : α), (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * rexp (g x) = rexp ((f + g) x) / ∫ (x : α), rexp (f x) ∂μ
⊢ ∫ (x : α), rexp ((f + g) x) * (∫ (x : α), rexp (f x) ∂μ)⁻¹ ∂μ =
    (∫ (x : α), rexp ((f + g) x) ∂μ) * (∫ (x : α), rexp (f x) ∂μ)⁻¹

tactic: rw [integral_mul_right]
state_before: case inr
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ f g : α → ℝ
h0 : NeZero μ
this : ∀ (x : α), (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * rexp (g x) = rexp ((f + g) x) / ∫ (x : α), rexp (f x) ∂μ
⊢ ∫ (x : α), rexp ((f + g) x) * (∫ (x : α), rexp (f x) ∂μ)⁻¹ ∂μ =
    (∫ (x : α), rexp ((f + g) x) ∂μ) * (∫ (x : α), rexp (f x) ∂μ)⁻¹
state_after: no goals

tactic: intro x
state_before: α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ f g : α → ℝ
h0 : NeZero μ
⊢ ∀ (x : α), (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * rexp (g x) = rexp ((f + g) x) / ∫ (x : α), rexp (f x) ∂μ
state_after: α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ f g : α → ℝ
h0 : NeZero μ
x : α
⊢ (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * rexp (g x) = rexp ((f + g) x) / ∫ (x : α), rexp (f x) ∂μ

tactic: rw [Pi.add_apply, exp_add]
state_before: α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ f g : α → ℝ
h0 : NeZero μ
x : α
⊢ (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * rexp (g x) = rexp ((f + g) x) / ∫ (x : α), rexp (f x) ∂μ
state_after: α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ f g : α → ℝ
h0 : NeZero μ
x : α
⊢ (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * rexp (g x) = rexp (f x) * rexp (g x) / ∫ (x : α), rexp (f x) ∂μ

tactic: ring
state_before: α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f✝ f g : α → ℝ
h0 : NeZero μ
x : α
⊢ (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * rexp (g x) = rexp (f x) * rexp (g x) / ∫ (x : α), rexp (f x) ∂μ
state_after: no goals