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

Proof steps:
state_before: f : ℝ → ℝ
x✝ : ℝ
n✝ : ℕ
x : ℝ
n : ℕ
⊢ logGammaSeq (x + 1) n = logGammaSeq x (n + 1) + log x - (x + 1) * (log (↑n + 1) - log ↑n)
state_after: f : ℝ → ℝ
x✝ : ℝ
n✝ : ℕ
x : ℝ
n : ℕ
⊢ (x + 1) * log ↑n + log ↑n ! - ∑ m ∈ Finset.range (n + 1), log (x + 1 + ↑m) =
    x * log ↑(n + 1) + log ↑((n + 1) * n !) - ∑ m ∈ Finset.range (n + 1 + 1), log (x + ↑m) + log x -
      (x + 1) * (log (↑n + 1) - log ↑n)
tactic: dsimp only [Nat.factorial_succ, logGammaSeq]
state_before: f : ℝ → ℝ
x✝ : ℝ
n✝ : ℕ
x : ℝ
n : ℕ
⊢ (x + 1) * log ↑n + log ↑n ! - ∑ m ∈ Finset.range (n + 1), log (x + 1 + ↑m) =
    x * log ↑(n + 1) + log ↑((n + 1) * n !) - ∑ m ∈ Finset.range (n + 1 + 1), log (x + ↑m) + log x -
      (x + 1) * (log (↑n + 1) - log ↑n)
state_after: f : ℝ → ℝ
x✝ : ℝ
n✝ : ℕ
x : ℝ
n : ℕ
⊢ (x + 1) * log ↑n + log ↑n ! - ∑ m ∈ Finset.range (n + 1), log (x + 1 + ↑m) =
    x * log ↑(n + 1) + log ↑((n + 1) * n !) - (∑ k ∈ Finset.range (n + 1), log (x + ↑(k + 1)) + log x) + log x -
      (x + 1) * (log (↑n + 1) - log ↑n)
tactic: conv_rhs => rw [Finset.sum_range_succ', Nat.cast_zero, add_zero]
state_before: f : ℝ → ℝ
x✝ : ℝ
n✝ : ℕ
x : ℝ
n : ℕ
⊢ (x + 1) * log ↑n + log ↑n ! - ∑ m ∈ Finset.range (n + 1), log (x + 1 + ↑m) =
    x * log ↑(n + 1) + log ↑((n + 1) * n !) - (∑ k ∈ Finset.range (n + 1), log (x + ↑(k + 1)) + log x) + log x -
      (x + 1) * (log (↑n + 1) - log ↑n)
state_after: f : ℝ → ℝ
x✝ : ℝ
n✝ : ℕ
x : ℝ
n : ℕ
⊢ (x + 1) * log ↑n + log ↑n ! - ∑ m ∈ Finset.range (n + 1), log (x + 1 + ↑m) =
    x * log ↑(n + 1) + (log ↑(n + 1) + log ↑n !) - (∑ k ∈ Finset.range (n + 1), log (x + ↑(k + 1)) + log x) + log x -
      (x + 1) * (log (↑n + 1) - log ↑n)

case hx
f : ℝ → ℝ
x✝ : ℝ
n✝ : ℕ
x : ℝ
n : ℕ
⊢ ↑(n + 1) ≠ 0

case hy
f : ℝ → ℝ
x✝ : ℝ
n✝ : ℕ
x : ℝ
n : ℕ
⊢ ↑n ! ≠ 0
tactic: rw [Nat.cast_mul, log_mul]
state_before: f : ℝ → ℝ
x✝ : ℝ
n✝ : ℕ
x : ℝ
n : ℕ
⊢ (x + 1) * log ↑n + log ↑n ! - ∑ m ∈ Finset.range (n + 1), log (x + 1 + ↑m) =
    x * log ↑(n + 1) + (log ↑(n + 1) + log ↑n !) - (∑ k ∈ Finset.range (n + 1), log (x + ↑(k + 1)) + log x) + log x -
      (x + 1) * (log (↑n + 1) - log ↑n)

case hx
f : ℝ → ℝ
x✝ : ℝ
n✝ : ℕ
x : ℝ
n : ℕ
⊢ ↑(n + 1) ≠ 0

case hy
f : ℝ → ℝ
x✝ : ℝ
n✝ : ℕ
x : ℝ
n : ℕ
⊢ ↑n ! ≠ 0
state_after: case hx
f : ℝ → ℝ
x✝ : ℝ
n✝ : ℕ
x : ℝ
n : ℕ
⊢ ↑(n + 1) ≠ 0

case hy
f : ℝ → ℝ
x✝ : ℝ
n✝ : ℕ
x : ℝ
n : ℕ
⊢ ↑n ! ≠ 0

f : ℝ → ℝ
x✝ : ℝ
n✝ : ℕ
x : ℝ
n : ℕ
⊢ (x + 1) * log ↑n + log ↑n ! - ∑ m ∈ Finset.range (n + 1), log (x + 1 + ↑m) =
    x * log ↑(n + 1) + (log ↑(n + 1) + log ↑n !) - (∑ k ∈ Finset.range (n + 1), log (x + ↑(k + 1)) + log x) + log x -
      (x + 1) * (log (↑n + 1) - log ↑n)
tactic: rotate_left
state_before: f : ℝ → ℝ
x✝ : ℝ
n✝ : ℕ
x : ℝ
n : ℕ
⊢ (x + 1) * log ↑n + log ↑n ! - ∑ m ∈ Finset.range (n + 1), log (x + 1 + ↑m) =
    x * log ↑(n + 1) + (log ↑(n + 1) + log ↑n !) - (∑ k ∈ Finset.range (n + 1), log (x + ↑(k + 1)) + log x) + log x -
      (x + 1) * (log (↑n + 1) - log ↑n)
state_after: f : ℝ → ℝ
x✝ : ℝ
n✝ : ℕ
x : ℝ
n : ℕ
this : ∑ m ∈ Finset.range (n + 1), log (x + 1 + ↑m) = ∑ k ∈ Finset.range (n + 1), log (x + ↑(k + 1))
⊢ (x + 1) * log ↑n + log ↑n ! - ∑ m ∈ Finset.range (n + 1), log (x + 1 + ↑m) =
    x * log ↑(n + 1) + (log ↑(n + 1) + log ↑n !) - (∑ k ∈ Finset.range (n + 1), log (x + ↑(k + 1)) + log x) + log x -
      (x + 1) * (log (↑n + 1) - log ↑n)
tactic: have :
    ∑ m ∈ Finset.range (n + 1), log (x + 1 + ↑m) =
      ∑ k ∈ Finset.range (n + 1), log (x + ↑(k + 1)) := by
    congr! 2 with m
    push_cast
    abel
state_before: f : ℝ → ℝ
x✝ : ℝ
n✝ : ℕ
x : ℝ
n : ℕ
this : ∑ m ∈ Finset.range (n + 1), log (x + 1 + ↑m) = ∑ k ∈ Finset.range (n + 1), log (x + ↑(k + 1))
⊢ (x + 1) * log ↑n + log ↑n ! - ∑ m ∈ Finset.range (n + 1), log (x + 1 + ↑m) =
    x * log ↑(n + 1) + (log ↑(n + 1) + log ↑n !) - (∑ k ∈ Finset.range (n + 1), log (x + ↑(k + 1)) + log x) + log x -
      (x + 1) * (log (↑n + 1) - log ↑n)
state_after: f : ℝ → ℝ
x✝ : ℝ
n✝ : ℕ
x : ℝ
n : ℕ
this : ∑ m ∈ Finset.range (n + 1), log (x + 1 + ↑m) = ∑ k ∈ Finset.range (n + 1), log (x + ↑(k + 1))
⊢ (x + 1) * log ↑n + log ↑n ! - ∑ m ∈ Finset.range (n + 1), log (x + 1 + ↑m) =
    x * log (↑n + 1) + (log (↑n + 1) + log ↑n !) - (∑ m ∈ Finset.range (n + 1), log (x + 1 + ↑m) + log x) + log x -
      (x + 1) * (log (↑n + 1) - log ↑n)
tactic: rw [← this, Nat.cast_add_one n]
state_before: f : ℝ → ℝ
x✝ : ℝ
n✝ : ℕ
x : ℝ
n : ℕ
this : ∑ m ∈ Finset.range (n + 1), log (x + 1 + ↑m) = ∑ k ∈ Finset.range (n + 1), log (x + ↑(k + 1))
⊢ (x + 1) * log ↑n + log ↑n ! - ∑ m ∈ Finset.range (n + 1), log (x + 1 + ↑m) =
    x * log (↑n + 1) + (log (↑n + 1) + log ↑n !) - (∑ m ∈ Finset.range (n + 1), log (x + 1 + ↑m) + log x) + log x -
      (x + 1) * (log (↑n + 1) - log ↑n)
state_after: no goals
tactic: ring