Theorem: Real.Gamma_one_half_eq
File: Mathlib/Analysis/SpecialFunctions/Gaussian/GaussianIntegral.lean

tactic: rw [Gamma_eq_integral one_half_pos, ← integral_comp_rpow_Ioi_of_pos zero_lt_two]
state_before: ⊢ Gamma (1 / 2) = √π
state_after: ⊢ ∫ (x : ℝ) in Ioi 0, (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) = √π

tactic: convert congr_arg (fun x : ℝ => 2 * x) (integral_gaussian_Ioi 1) using 1
state_before: ⊢ ∫ (x : ℝ) in Ioi 0, (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) = √π
state_after: case h.e'_2

⊢ ∫ (x : ℝ) in Ioi 0, (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) =
    2 * ∫ (x : ℝ) in Ioi 0, rexp (-1 * x ^ 2)

case h.e'_3

⊢ √π = 2 * (√(π / 1) / 2)

tactic: rw [← integral_mul_left]
state_before: case h.e'_2

⊢ ∫ (x : ℝ) in Ioi 0, (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) =
    2 * ∫ (x : ℝ) in Ioi 0, rexp (-1 * x ^ 2)
state_after: case h.e'_2

⊢ ∫ (x : ℝ) in Ioi 0, (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) =
    ∫ (a : ℝ) in Ioi 0, 2 * rexp (-1 * a ^ 2)

tactic: refine setIntegral_congr measurableSet_Ioi fun x hx => ?_
state_before: case h.e'_2

⊢ ∫ (x : ℝ) in Ioi 0, (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) =
    ∫ (a : ℝ) in Ioi 0, 2 * rexp (-1 * a ^ 2)
state_after: case h.e'_2
x : ℝ
hx : x ∈ Ioi 0
⊢ (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) = 2 * rexp (-1 * x ^ 2)

tactic: have : (x ^ (2 : ℝ)) ^ (1 / (2 : ℝ) - 1) = x⁻¹ := by
  rw [← rpow_mul (le_of_lt hx)]
  norm_num
  rw [rpow_neg (le_of_lt hx), rpow_one]
state_before: case h.e'_2
x : ℝ
hx : x ∈ Ioi 0
⊢ (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) = 2 * rexp (-1 * x ^ 2)
state_after: case h.e'_2
x : ℝ
hx : x ∈ Ioi 0
this : (x ^ 2) ^ (1 / 2 - 1) = x⁻¹
⊢ (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) = 2 * rexp (-1 * x ^ 2)

tactic: rw [smul_eq_mul, this]
state_before: case h.e'_2
x : ℝ
hx : x ∈ Ioi 0
this : (x ^ 2) ^ (1 / 2 - 1) = x⁻¹
⊢ (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) = 2 * rexp (-1 * x ^ 2)
state_after: case h.e'_2
x : ℝ
hx : x ∈ Ioi 0
this : (x ^ 2) ^ (1 / 2 - 1) = x⁻¹
⊢ 2 * x ^ (2 - 1) * (rexp (-x ^ 2) * x⁻¹) = 2 * rexp (-1 * x ^ 2)

tactic: field_simp [(ne_of_lt (show 0 < x from hx)).symm]
state_before: case h.e'_2
x : ℝ
hx : x ∈ Ioi 0
this : (x ^ 2) ^ (1 / 2 - 1) = x⁻¹
⊢ 2 * x ^ (2 - 1) * (rexp (-x ^ 2) * x⁻¹) = 2 * rexp (-1 * x ^ 2)
state_after: case h.e'_2
x : ℝ
hx : x ∈ Ioi 0
this : (x ^ 2) ^ (1 / 2 - 1) = x⁻¹
⊢ 2 * x ^ (2 - 1) * rexp (-x ^ 2) = 2 * rexp (-x ^ 2) * x

tactic: norm_num
state_before: case h.e'_2
x : ℝ
hx : x ∈ Ioi 0
this : (x ^ 2) ^ (1 / 2 - 1) = x⁻¹
⊢ 2 * x ^ (2 - 1) * rexp (-x ^ 2) = 2 * rexp (-x ^ 2) * x
state_after: case h.e'_2
x : ℝ
hx : x ∈ Ioi 0
this : (x ^ 2) ^ (1 / 2 - 1) = x⁻¹
⊢ 2 * x * rexp (-x ^ 2) = 2 * rexp (-x ^ 2) * x

tactic: ring
state_before: case h.e'_2
x : ℝ
hx : x ∈ Ioi 0
this : (x ^ 2) ^ (1 / 2 - 1) = x⁻¹
⊢ 2 * x * rexp (-x ^ 2) = 2 * rexp (-x ^ 2) * x
state_after: no goals

tactic: rw [← rpow_mul (le_of_lt hx)]
state_before: x : ℝ
hx : x ∈ Ioi 0
⊢ (x ^ 2) ^ (1 / 2 - 1) = x⁻¹
state_after: x : ℝ
hx : x ∈ Ioi 0
⊢ x ^ (2 * (1 / 2 - 1)) = x⁻¹

tactic: norm_num
state_before: x : ℝ
hx : x ∈ Ioi 0
⊢ x ^ (2 * (1 / 2 - 1)) = x⁻¹
state_after: x : ℝ
hx : x ∈ Ioi 0
⊢ x ^ (-1) = x⁻¹

tactic: rw [rpow_neg (le_of_lt hx), rpow_one]
state_before: x : ℝ
hx : x ∈ Ioi 0
⊢ x ^ (-1) = x⁻¹
state_after: no goals

tactic: rw [div_one, ← mul_div_assoc, mul_comm, mul_div_cancel_right₀ _ (two_ne_zero' ℝ)]
state_before: case h.e'_3

⊢ √π = 2 * (√(π / 1) / 2)
state_after: no goals