Theorem: Real.Gamma_eq_integral
File: Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean

tactic: rw [Gamma, Complex.Gamma_eq_integral (by rwa [Complex.ofReal_re] : 0 < Complex.re s)]
state_before: s : ℝ
hs : 0 < s
⊢ Gamma s = ∫ (x : ℝ) in Ioi 0, rexp (-x) * x ^ (s - 1)
state_after: s : ℝ
hs : 0 < s
⊢ (↑s).GammaIntegral.re = ∫ (x : ℝ) in Ioi 0, rexp (-x) * x ^ (s - 1)

tactic: dsimp only [Complex.GammaIntegral]
state_before: s : ℝ
hs : 0 < s
⊢ (↑s).GammaIntegral.re = ∫ (x : ℝ) in Ioi 0, rexp (-x) * x ^ (s - 1)
state_after: s : ℝ
hs : 0 < s
⊢ (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (↑s - 1)).re = ∫ (x : ℝ) in Ioi 0, rexp (-x) * x ^ (s - 1)

tactic: simp_rw [← Complex.ofReal_one, ← Complex.ofReal_sub]
state_before: s : ℝ
hs : 0 < s
⊢ (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (↑s - 1)).re = ∫ (x : ℝ) in Ioi 0, rexp (-x) * x ^ (s - 1)
state_after: s : ℝ
hs : 0 < s
⊢ (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ ↑(s - 1)).re = ∫ (x : ℝ) in Ioi 0, rexp (-x) * x ^ (s - 1)

tactic: suffices ∫ x : ℝ in Ioi 0, ↑(exp (-x)) * (x : ℂ) ^ ((s - 1 : ℝ) : ℂ) =
    ∫ x : ℝ in Ioi 0, ((exp (-x) * x ^ (s - 1) : ℝ) : ℂ) by
  have cc : ∀ r : ℝ, Complex.ofReal' r = @RCLike.ofReal ℂ _ r := fun r => rfl
  conv_lhs => rw [this]; enter [1, 2, x]; rw [cc]
  rw [_root_.integral_ofReal, ← cc, Complex.ofReal_re]
state_before: s : ℝ
hs : 0 < s
⊢ (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ ↑(s - 1)).re = ∫ (x : ℝ) in Ioi 0, rexp (-x) * x ^ (s - 1)
state_after: s : ℝ
hs : 0 < s
⊢ ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ ↑(s - 1) = ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x) * x ^ (s - 1))

tactic: refine setIntegral_congr measurableSet_Ioi fun x hx => ?_
state_before: s : ℝ
hs : 0 < s
⊢ ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ ↑(s - 1) = ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x) * x ^ (s - 1))
state_after: s : ℝ
hs : 0 < s
x : ℝ
hx : x ∈ Ioi 0
⊢ ↑(rexp (-x)) * ↑x ^ ↑(s - 1) = ↑(rexp (-x) * x ^ (s - 1))

tactic: push_cast
state_before: s : ℝ
hs : 0 < s
x : ℝ
hx : x ∈ Ioi 0
⊢ ↑(rexp (-x)) * ↑x ^ ↑(s - 1) = ↑(rexp (-x) * x ^ (s - 1))
state_after: s : ℝ
hs : 0 < s
x : ℝ
hx : x ∈ Ioi 0
⊢ Complex.exp (-↑x) * ↑x ^ (↑s - 1) = Complex.exp (-↑x) * ↑(x ^ (s - 1))

tactic: rw [Complex.ofReal_cpow (le_of_lt hx)]
state_before: s : ℝ
hs : 0 < s
x : ℝ
hx : x ∈ Ioi 0
⊢ Complex.exp (-↑x) * ↑x ^ (↑s - 1) = Complex.exp (-↑x) * ↑(x ^ (s - 1))
state_after: s : ℝ
hs : 0 < s
x : ℝ
hx : x ∈ Ioi 0
⊢ Complex.exp (-↑x) * ↑x ^ (↑s - 1) = Complex.exp (-↑x) * ↑x ^ ↑(s - 1)

tactic: push_cast
state_before: s : ℝ
hs : 0 < s
x : ℝ
hx : x ∈ Ioi 0
⊢ Complex.exp (-↑x) * ↑x ^ (↑s - 1) = Complex.exp (-↑x) * ↑x ^ ↑(s - 1)
state_after: s : ℝ
hs : 0 < s
x : ℝ
hx : x ∈ Ioi 0
⊢ Complex.exp (-↑x) * ↑x ^ (↑s - 1) = Complex.exp (-↑x) * ↑x ^ (↑s - 1)

tactic: rfl
state_before: s : ℝ
hs : 0 < s
x : ℝ
hx : x ∈ Ioi 0
⊢ Complex.exp (-↑x) * ↑x ^ (↑s - 1) = Complex.exp (-↑x) * ↑x ^ (↑s - 1)
state_after: no goals

tactic: rwa [Complex.ofReal_re]
state_before: s : ℝ
hs : 0 < s
⊢ 0 < (↑s).re
state_after: no goals

tactic: have cc : ∀ r : ℝ, Complex.ofReal' r = @RCLike.ofReal ℂ _ r := fun r => rfl
state_before: s : ℝ
hs : 0 < s
this : ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ ↑(s - 1) = ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x) * x ^ (s - 1))
⊢ (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ ↑(s - 1)).re = ∫ (x : ℝ) in Ioi 0, rexp (-x) * x ^ (s - 1)
state_after: s : ℝ
hs : 0 < s
this : ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ ↑(s - 1) = ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x) * x ^ (s - 1))
cc : ∀ (r : ℝ), ↑r = ↑r
⊢ (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ ↑(s - 1)).re = ∫ (x : ℝ) in Ioi 0, rexp (-x) * x ^ (s - 1)

tactic: conv_lhs => rw [this]; enter [1, 2, x]; rw [cc]
state_before: s : ℝ
hs : 0 < s
this : ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ ↑(s - 1) = ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x) * x ^ (s - 1))
cc : ∀ (r : ℝ), ↑r = ↑r
⊢ (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ ↑(s - 1)).re = ∫ (x : ℝ) in Ioi 0, rexp (-x) * x ^ (s - 1)
state_after: s : ℝ
hs : 0 < s
this : ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ ↑(s - 1) = ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x) * x ^ (s - 1))
cc : ∀ (r : ℝ), ↑r = ↑r
⊢ (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x) * x ^ (s - 1))).re = ∫ (x : ℝ) in Ioi 0, rexp (-x) * x ^ (s - 1)

tactic: rw [_root_.integral_ofReal, ← cc, Complex.ofReal_re]
state_before: s : ℝ
hs : 0 < s
this : ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ ↑(s - 1) = ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x) * x ^ (s - 1))
cc : ∀ (r : ℝ), ↑r = ↑r
⊢ (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x) * x ^ (s - 1))).re = ∫ (x : ℝ) in Ioi 0, rexp (-x) * x ^ (s - 1)
state_after: no goals