Theorem: Real.log_doublingGamma_eq
File: Mathlib/Analysis/SpecialFunctions/Gamma/BohrMollerup.lean

tactic: intro s hs
state_before: ⊢ EqOn (log ∘ doublingGamma) (fun s => log (Gamma (s / 2)) + log (Gamma (s / 2 + 1 / 2)) + s * log 2 - log (2 * √π))
    (Ioi 0)
state_after: s : ℝ
hs : s ∈ Ioi 0
⊢ (log ∘ doublingGamma) s = (fun s => log (Gamma (s / 2)) + log (Gamma (s / 2 + 1 / 2)) + s * log 2 - log (2 * √π)) s

tactic: have h1 : √π ≠ 0 := sqrt_ne_zero'.mpr pi_pos
state_before: s : ℝ
hs : s ∈ Ioi 0
⊢ (log ∘ doublingGamma) s = (fun s => log (Gamma (s / 2)) + log (Gamma (s / 2 + 1 / 2)) + s * log 2 - log (2 * √π)) s
state_after: s : ℝ
hs : s ∈ Ioi 0
h1 : √π ≠ 0
⊢ (log ∘ doublingGamma) s = (fun s => log (Gamma (s / 2)) + log (Gamma (s / 2 + 1 / 2)) + s * log 2 - log (2 * √π)) s

tactic: have h2 : Gamma (s / 2) ≠ 0 := (Gamma_pos_of_pos <| div_pos hs two_pos).ne'
state_before: s : ℝ
hs : s ∈ Ioi 0
h1 : √π ≠ 0
⊢ (log ∘ doublingGamma) s = (fun s => log (Gamma (s / 2)) + log (Gamma (s / 2 + 1 / 2)) + s * log 2 - log (2 * √π)) s
state_after: s : ℝ
hs : s ∈ Ioi 0
h1 : √π ≠ 0
h2 : Gamma (s / 2) ≠ 0
⊢ (log ∘ doublingGamma) s = (fun s => log (Gamma (s / 2)) + log (Gamma (s / 2 + 1 / 2)) + s * log 2 - log (2 * √π)) s

tactic: have h3 : Gamma (s / 2 + 1 / 2) ≠ 0 :=
  (Gamma_pos_of_pos <| add_pos (div_pos hs two_pos) one_half_pos).ne'
state_before: s : ℝ
hs : s ∈ Ioi 0
h1 : √π ≠ 0
h2 : Gamma (s / 2) ≠ 0
⊢ (log ∘ doublingGamma) s = (fun s => log (Gamma (s / 2)) + log (Gamma (s / 2 + 1 / 2)) + s * log 2 - log (2 * √π)) s
state_after: s : ℝ
hs : s ∈ Ioi 0
h1 : √π ≠ 0
h2 : Gamma (s / 2) ≠ 0
h3 : Gamma (s / 2 + 1 / 2) ≠ 0
⊢ (log ∘ doublingGamma) s = (fun s => log (Gamma (s / 2)) + log (Gamma (s / 2 + 1 / 2)) + s * log 2 - log (2 * √π)) s

tactic: have h4 : (2 : ℝ) ^ (s - 1) ≠ 0 := (rpow_pos_of_pos two_pos _).ne'
state_before: s : ℝ
hs : s ∈ Ioi 0
h1 : √π ≠ 0
h2 : Gamma (s / 2) ≠ 0
h3 : Gamma (s / 2 + 1 / 2) ≠ 0
⊢ (log ∘ doublingGamma) s = (fun s => log (Gamma (s / 2)) + log (Gamma (s / 2 + 1 / 2)) + s * log 2 - log (2 * √π)) s
state_after: s : ℝ
hs : s ∈ Ioi 0
h1 : √π ≠ 0
h2 : Gamma (s / 2) ≠ 0
h3 : Gamma (s / 2 + 1 / 2) ≠ 0
h4 : 2 ^ (s - 1) ≠ 0
⊢ (log ∘ doublingGamma) s = (fun s => log (Gamma (s / 2)) + log (Gamma (s / 2 + 1 / 2)) + s * log 2 - log (2 * √π)) s

tactic: rw [Function.comp_apply, doublingGamma, log_div (mul_ne_zero (mul_ne_zero h2 h3) h4) h1,
  log_mul (mul_ne_zero h2 h3) h4, log_mul h2 h3, log_rpow two_pos, log_mul two_ne_zero h1]
state_before: s : ℝ
hs : s ∈ Ioi 0
h1 : √π ≠ 0
h2 : Gamma (s / 2) ≠ 0
h3 : Gamma (s / 2 + 1 / 2) ≠ 0
h4 : 2 ^ (s - 1) ≠ 0
⊢ (log ∘ doublingGamma) s = (fun s => log (Gamma (s / 2)) + log (Gamma (s / 2 + 1 / 2)) + s * log 2 - log (2 * √π)) s
state_after: s : ℝ
hs : s ∈ Ioi 0
h1 : √π ≠ 0
h2 : Gamma (s / 2) ≠ 0
h3 : Gamma (s / 2 + 1 / 2) ≠ 0
h4 : 2 ^ (s - 1) ≠ 0
⊢ log (Gamma (s / 2)) + log (Gamma (s / 2 + 1 / 2)) + (s - 1) * log 2 - log √π =
    (fun s => log (Gamma (s / 2)) + log (Gamma (s / 2 + 1 / 2)) + s * log 2 - (log 2 + log √π)) s

tactic: ring_nf
state_before: s : ℝ
hs : s ∈ Ioi 0
h1 : √π ≠ 0
h2 : Gamma (s / 2) ≠ 0
h3 : Gamma (s / 2 + 1 / 2) ≠ 0
h4 : 2 ^ (s - 1) ≠ 0
⊢ log (Gamma (s / 2)) + log (Gamma (s / 2 + 1 / 2)) + (s - 1) * log 2 - log √π =
    (fun s => log (Gamma (s / 2)) + log (Gamma (s / 2 + 1 / 2)) + s * log 2 - (log 2 + log √π)) s
state_after: no goals