Theorem: integrableOn_rpow_mul_exp_neg_mul_rpow
File: Mathlib/Analysis/SpecialFunctions/Gaussian/GaussianIntegral.lean

tactic: have hib : 0 < b ^ (-p⁻¹) := rpow_pos_of_pos hb _
state_before: p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
⊢ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ p)) (Ioi 0) volume
state_after: p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
⊢ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ p)) (Ioi 0) volume

tactic: suffices IntegrableOn (fun x ↦ (b ^ (-p⁻¹)) ^ s * (x ^ s * exp (-x ^ p))) (Ioi 0) by
  rw [show 0 = b ^ (-p⁻¹) * 0 by rw [mul_zero], ← integrableOn_Ioi_comp_mul_left_iff _ _ hib]
  refine this.congr_fun (fun _ hx => ?_) measurableSet_Ioi
  rw [← mul_assoc, mul_rpow, mul_rpow, ← rpow_mul (z := p), neg_mul, neg_mul, inv_mul_cancel,
    rpow_neg_one, mul_inv_cancel_left₀]
  all_goals linarith [mem_Ioi.mp hx]
state_before: p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
⊢ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ p)) (Ioi 0) volume
state_after: p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
⊢ IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume

tactic: refine Integrable.const_mul ?_ _
state_before: p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
⊢ IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume
state_after: p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
⊢ Integrable (fun x => x ^ s * rexp (-x ^ p)) (volume.restrict (Ioi 0))

tactic: rw [← IntegrableOn]
state_before: p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
⊢ Integrable (fun x => x ^ s * rexp (-x ^ p)) (volume.restrict (Ioi 0))
state_after: p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
⊢ IntegrableOn (fun x => x ^ s * rexp (-x ^ p)) (Ioi 0) volume

tactic: exact integrableOn_rpow_mul_exp_neg_rpow hs hp
state_before: p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
⊢ IntegrableOn (fun x => x ^ s * rexp (-x ^ p)) (Ioi 0) volume
state_after: no goals

tactic: rw [show 0 = b ^ (-p⁻¹) * 0 by rw [mul_zero], ← integrableOn_Ioi_comp_mul_left_iff _ _ hib]
state_before: p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
this : IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume
⊢ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ p)) (Ioi 0) volume
state_after: p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
this : IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume
⊢ IntegrableOn (fun x => (b ^ (-p⁻¹) * x) ^ s * rexp (-b * (b ^ (-p⁻¹) * x) ^ p)) (Ioi 0) volume

tactic: refine this.congr_fun (fun _ hx => ?_) measurableSet_Ioi
state_before: p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
this : IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume
⊢ IntegrableOn (fun x => (b ^ (-p⁻¹) * x) ^ s * rexp (-b * (b ^ (-p⁻¹) * x) ^ p)) (Ioi 0) volume
state_after: p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
this : IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume
x✝ : ℝ
hx : x✝ ∈ Ioi 0
⊢ (b ^ (-p⁻¹)) ^ s * (x✝ ^ s * rexp (-x✝ ^ p)) = (b ^ (-p⁻¹) * x✝) ^ s * rexp (-b * (b ^ (-p⁻¹) * x✝) ^ p)

tactic: rw [← mul_assoc, mul_rpow, mul_rpow, ← rpow_mul (z := p), neg_mul, neg_mul, inv_mul_cancel,
  rpow_neg_one, mul_inv_cancel_left₀]
state_before: p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
this : IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume
x✝ : ℝ
hx : x✝ ∈ Ioi 0
⊢ (b ^ (-p⁻¹)) ^ s * (x✝ ^ s * rexp (-x✝ ^ p)) = (b ^ (-p⁻¹) * x✝) ^ s * rexp (-b * (b ^ (-p⁻¹) * x✝) ^ p)
state_after: case h
p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
this : IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume
x✝ : ℝ
hx : x✝ ∈ Ioi 0
⊢ b ≠ 0

p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
this : IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume
x✝ : ℝ
hx : x✝ ∈ Ioi 0
⊢ p ≠ 0

case hx
p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
this : IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume
x✝ : ℝ
hx : x✝ ∈ Ioi 0
⊢ 0 ≤ b

case hx
p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
this : IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume
x✝ : ℝ
hx : x✝ ∈ Ioi 0
⊢ 0 ≤ b ^ (-p⁻¹)

case hy
p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
this : IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume
x✝ : ℝ
hx : x✝ ∈ Ioi 0
⊢ 0 ≤ x✝

case hx
p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
this : IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume
x✝ : ℝ
hx : x✝ ∈ Ioi 0
⊢ 0 ≤ b ^ (-p⁻¹)

case hy
p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
this : IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume
x✝ : ℝ
hx : x✝ ∈ Ioi 0
⊢ 0 ≤ x✝

tactic: all_goals linarith [mem_Ioi.mp hx]
state_before: case h
p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
this : IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume
x✝ : ℝ
hx : x✝ ∈ Ioi 0
⊢ b ≠ 0

p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
this : IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume
x✝ : ℝ
hx : x✝ ∈ Ioi 0
⊢ p ≠ 0

case hx
p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
this : IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume
x✝ : ℝ
hx : x✝ ∈ Ioi 0
⊢ 0 ≤ b

case hx
p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
this : IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume
x✝ : ℝ
hx : x✝ ∈ Ioi 0
⊢ 0 ≤ b ^ (-p⁻¹)

case hy
p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
this : IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume
x✝ : ℝ
hx : x✝ ∈ Ioi 0
⊢ 0 ≤ x✝

case hx
p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
this : IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume
x✝ : ℝ
hx : x✝ ∈ Ioi 0
⊢ 0 ≤ b ^ (-p⁻¹)

case hy
p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
this : IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume
x✝ : ℝ
hx : x✝ ∈ Ioi 0
⊢ 0 ≤ x✝
state_after: no goals

tactic: rw [mul_zero]
state_before: p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
this : IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume
⊢ 0 = b ^ (-p⁻¹) * 0
state_after: no goals

tactic: linarith [mem_Ioi.mp hx]
state_before: case hy
p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
this : IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume
x✝ : ℝ
hx : x✝ ∈ Ioi 0
⊢ 0 ≤ x✝
state_after: no goals