Theorem: Complex.GammaAux_recurrence2
File: Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean

tactic: cases' n with n n
state_before: s : ℂ
n : ℕ
h1 : -s.re < ↑n
⊢ GammaAux n s = GammaAux (n + 1) s
state_after: case zero
s : ℂ
h1 : -s.re < ↑0
⊢ GammaAux 0 s = GammaAux (0 + 1) s

case succ
s : ℂ
n : ℕ
h1 : -s.re < ↑(n + 1)
⊢ GammaAux (n + 1) s = GammaAux (n + 1 + 1) s

tactic: simp only [Nat.zero_eq, CharP.cast_eq_zero, Left.neg_neg_iff] at h1
state_before: case zero
s : ℂ
h1 : -s.re < ↑0
⊢ GammaAux 0 s = GammaAux (0 + 1) s
state_after: case zero
s : ℂ
h1 : 0 < s.re
⊢ GammaAux 0 s = GammaAux (0 + 1) s

tactic: dsimp only [GammaAux]
state_before: case zero
s : ℂ
h1 : 0 < s.re
⊢ GammaAux 0 s = GammaAux (0 + 1) s
state_after: case zero
s : ℂ
h1 : 0 < s.re
⊢ s.GammaIntegral = (s + 1).GammaIntegral / s

tactic: rw [GammaIntegral_add_one h1, mul_div_cancel_left₀]
state_before: case zero
s : ℂ
h1 : 0 < s.re
⊢ s.GammaIntegral = (s + 1).GammaIntegral / s
state_after: case zero.ha
s : ℂ
h1 : 0 < s.re
⊢ s ≠ 0

tactic: rintro rfl
state_before: case zero.ha
s : ℂ
h1 : 0 < s.re
⊢ s ≠ 0
state_after: case zero.ha
h1 : 0 < re 0
⊢ False

tactic: rw [zero_re] at h1
state_before: case zero.ha
h1 : 0 < re 0
⊢ False
state_after: case zero.ha
h1 : 0 < 0
⊢ False

tactic: exact h1.false
state_before: case zero.ha
h1 : 0 < 0
⊢ False
state_after: no goals

tactic: dsimp only [GammaAux]
state_before: case succ
s : ℂ
n : ℕ
h1 : -s.re < ↑(n + 1)
⊢ GammaAux (n + 1) s = GammaAux (n + 1 + 1) s
state_after: case succ
s : ℂ
n : ℕ
h1 : -s.re < ↑(n + 1)
⊢ GammaAux n (s + 1) / s = GammaAux n (s + 1 + 1) / (s + 1) / s

tactic: have : GammaAux n (s + 1 + 1) / (s + 1) = GammaAux n (s + 1) := by
  have hh1 : -(s + 1).re < n := by
    rw [Nat.cast_add, Nat.cast_one] at h1
    rw [add_re, one_re]; linarith
  rw [GammaAux_recurrence1 (s + 1) n hh1]
state_before: case succ
s : ℂ
n : ℕ
h1 : -s.re < ↑(n + 1)
⊢ GammaAux n (s + 1) / s = GammaAux n (s + 1 + 1) / (s + 1) / s
state_after: case succ
s : ℂ
n : ℕ
h1 : -s.re < ↑(n + 1)
this : GammaAux n (s + 1 + 1) / (s + 1) = GammaAux n (s + 1)
⊢ GammaAux n (s + 1) / s = GammaAux n (s + 1 + 1) / (s + 1) / s

tactic: rw [this]
state_before: case succ
s : ℂ
n : ℕ
h1 : -s.re < ↑(n + 1)
this : GammaAux n (s + 1 + 1) / (s + 1) = GammaAux n (s + 1)
⊢ GammaAux n (s + 1) / s = GammaAux n (s + 1 + 1) / (s + 1) / s
state_after: no goals

tactic: have hh1 : -(s + 1).re < n := by
  rw [Nat.cast_add, Nat.cast_one] at h1
  rw [add_re, one_re]; linarith
state_before: s : ℂ
n : ℕ
h1 : -s.re < ↑(n + 1)
⊢ GammaAux n (s + 1 + 1) / (s + 1) = GammaAux n (s + 1)
state_after: s : ℂ
n : ℕ
h1 : -s.re < ↑(n + 1)
hh1 : -(s + 1).re < ↑n
⊢ GammaAux n (s + 1 + 1) / (s + 1) = GammaAux n (s + 1)

tactic: rw [GammaAux_recurrence1 (s + 1) n hh1]
state_before: s : ℂ
n : ℕ
h1 : -s.re < ↑(n + 1)
hh1 : -(s + 1).re < ↑n
⊢ GammaAux n (s + 1 + 1) / (s + 1) = GammaAux n (s + 1)
state_after: no goals

tactic: rw [Nat.cast_add, Nat.cast_one] at h1
state_before: s : ℂ
n : ℕ
h1 : -s.re < ↑(n + 1)
⊢ -(s + 1).re < ↑n
state_after: s : ℂ
n : ℕ
h1 : -s.re < ↑n + 1
⊢ -(s + 1).re < ↑n

tactic: rw [add_re, one_re]
state_before: s : ℂ
n : ℕ
h1 : -s.re < ↑n + 1
⊢ -(s + 1).re < ↑n
state_after: s : ℂ
n : ℕ
h1 : -s.re < ↑n + 1
⊢ -(s.re + 1) < ↑n

tactic: linarith
state_before: s : ℂ
n : ℕ
h1 : -s.re < ↑n + 1
⊢ -(s.re + 1) < ↑n
state_after: no goals