l3lab/ntp-mathlib huggingface dataset:
theorem ascPochhammer_eval_zero {n : ℕ} : (ascPochhammer S n).eval 0 = if n = 0 then 1 else 0 := by
  cases n
  · simp
  · 

Proof state:
case succ
S : Type u
inst✝ : Semiring S
n✝ : ℕ
⊢ eval 0 (ascPochhammer S (Nat.succ n✝)) = if Nat.succ n✝ = 0 then 1 else 0

Next tactic:
simp [X_mul, Nat.succ_ne_zero, ascPochhammer_succ_left]
theorem ascPochhammer_zero_eval_zero : (ascPochhammer S 0).eval 0 = 1 := by 

Proof state:
S : Type u
inst✝ : Semiring S
⊢ eval 0 (ascPochhammer S 0) = 1

Next tactic:
simp
@[simp]
theorem ascPochhammer_ne_zero_eval_zero {n : ℕ} (h : n ≠ 0) : (ascPochhammer S n).eval 0 = 0 := by
  

Proof state:
S : Type u
inst✝ : Semiring S
n : ℕ
h : n ≠ 0
⊢ eval 0 (ascPochhammer S n) = 0

Next tactic:
simp [ascPochhammer_eval_zero, h]
theorem ascPochhammer_succ_right (n : ℕ) :
    ascPochhammer S (n + 1) = ascPochhammer S n * (X + (n : S[X])) := by
  

Proof state:
S : Type u
inst✝ : Semiring S
n : ℕ
⊢ ascPochhammer S (n + 1) = ascPochhammer S n * (X + ↑n)

Next tactic:
suffices h : ascPochhammer ℕ (n + 1) = ascPochhammer ℕ n * (X + (n : ℕ[X]))
theorem ascPochhammer_succ_right (n : ℕ) :
    ascPochhammer S (n + 1) = ascPochhammer S n * (X + (n : S[X])) := by
  suffices h : ascPochhammer ℕ (n + 1) = ascPochhammer ℕ n * (X + (n : ℕ[X]))
  · 

Proof state:
S : Type u
inst✝ : Semiring S
n : ℕ
h : ascPochhammer ℕ (n + 1) = ascPochhammer ℕ n * (X + ↑n)
⊢ ascPochhammer S (n + 1) = ascPochhammer S n * (X + ↑n)

Next tactic:
apply_fun Polynomial.map (algebraMap ℕ S) at h
theorem ascPochhammer_succ_right (n : ℕ) :
    ascPochhammer S (n + 1) = ascPochhammer S n * (X + (n : S[X])) := by
  suffices h : ascPochhammer ℕ (n + 1) = ascPochhammer ℕ n * (X + (n : ℕ[X]))
  · apply_fun Polynomial.map (algebraMap ℕ S) at h
    

Proof state:
S : Type u
inst✝ : Semiring S
n : ℕ
h : map (algebraMap ℕ S) (ascPochhammer ℕ (n + 1)) = map (algebraMap ℕ S) (ascPochhammer ℕ n * (X + ↑n))
⊢ ascPochhammer S (n + 1) = ascPochhammer S n * (X + ↑n)

Next tactic:
simpa only [ascPochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
      Polynomial.map_nat_cast] using h
theorem ascPochhammer_succ_right (n : ℕ) :
    ascPochhammer S (n + 1) = ascPochhammer S n * (X + (n : S[X])) := by
  suffices h : ascPochhammer ℕ (n + 1) = ascPochhammer ℕ n * (X + (n : ℕ[X]))
  · apply_fun Polynomial.map (algebraMap ℕ S) at h
    simpa only [ascPochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
      Polynomial.map_nat_cast] using h
  

Proof state:
case h
S : Type u
inst✝ : Semiring S
n : ℕ
⊢ ascPochhammer ℕ (n + 1) = ascPochhammer ℕ n * (X + ↑n)

Next tactic:
induction' n with n ih
theorem ascPochhammer_succ_right (n : ℕ) :
    ascPochhammer S (n + 1) = ascPochhammer S n * (X + (n : S[X])) := by
  suffices h : ascPochhammer ℕ (n + 1) = ascPochhammer ℕ n * (X + (n : ℕ[X]))
  · apply_fun Polynomial.map (algebraMap ℕ S) at h
    simpa only [ascPochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
      Polynomial.map_nat_cast] using h
  induction' n with n ih
  · 

Proof state:
case h.zero
S : Type u
inst✝ : Semiring S
⊢ ascPochhammer ℕ (Nat.zero + 1) = ascPochhammer ℕ Nat.zero * (X + ↑Nat.zero)

Next tactic:
simp
theorem ascPochhammer_succ_right (n : ℕ) :
    ascPochhammer S (n + 1) = ascPochhammer S n * (X + (n : S[X])) := by
  suffices h : ascPochhammer ℕ (n + 1) = ascPochhammer ℕ n * (X + (n : ℕ[X]))
  · apply_fun Polynomial.map (algebraMap ℕ S) at h
    simpa only [ascPochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
      Polynomial.map_nat_cast] using h
  induction' n with n ih
  · simp
  · 

Proof state:
case h.succ
S : Type u
inst✝ : Semiring S
n : ℕ
ih : ascPochhammer ℕ (n + 1) = ascPochhammer ℕ n * (X + ↑n)
⊢ ascPochhammer ℕ (Nat.succ n + 1) = ascPochhammer ℕ (Nat.succ n) * (X + ↑(Nat.succ n))

Next tactic:
conv_lhs =>
      rw [ascPochhammer_succ_left, ih, mul_comp, ← mul_assoc, ← ascPochhammer_succ_left, add_comp,
          X_comp, nat_cast_comp, add_assoc, add_comm (1 : ℕ[X]), ← Nat.cast_succ]
theorem ascPochhammer_succ_right (n : ℕ) :
    ascPochhammer S (n + 1) = ascPochhammer S n * (X + (n : S[X])) := by
  suffices h : ascPochhammer ℕ (n + 1) = ascPochhammer ℕ n * (X + (n : ℕ[X]))
  · apply_fun Polynomial.map (algebraMap ℕ S) at h
    simpa only [ascPochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
      Polynomial.map_nat_cast] using h
  induction' n with n ih
  · simp
  · conv_lhs =>
      

Proof state:
S : Type u
inst✝ : Semiring S
n : ℕ
ih : ascPochhammer ℕ (n + 1) = ascPochhammer ℕ n * (X + ↑n)
| ascPochhammer ℕ (Nat.succ n + 1)

Next tactic:
rw [ascPochhammer_succ_left, ih, mul_comp, ← mul_assoc, ← ascPochhammer_succ_left, add_comp,
          X_comp, nat_cast_comp, add_assoc, add_comm (1 : ℕ[X]), ← Nat.cast_succ]
theorem ascPochhammer_succ_eval {S : Type*} [Semiring S] (n : ℕ) (k : S) :
    (ascPochhammer S (n + 1)).eval k = (ascPochhammer S n).eval k * (k + n) := by
  

Proof state:
S✝ : Type u
inst✝¹ : Semiring S✝
S : Type u_1
inst✝ : Semiring S
n : ℕ
k : S
⊢ eval k (ascPochhammer S (n + 1)) = eval k (ascPochhammer S n) * (k + ↑n)

Next tactic:
rw [ascPochhammer_succ_right, mul_add, eval_add, eval_mul_X, ← Nat.cast_comm, ← C_eq_nat_cast,
    eval_C_mul, Nat.cast_comm, ← mul_add]
theorem ascPochhammer_succ_comp_X_add_one (n : ℕ) :
    (ascPochhammer S (n + 1)).comp (X + 1) =
      ascPochhammer S (n + 1) + (n + 1) • (ascPochhammer S n).comp (X + 1) := by
  

Proof state:
S : Type u
inst✝ : Semiring S
n : ℕ
⊢ comp (ascPochhammer S (n + 1)) (X + 1) = ascPochhammer S (n + 1) + (n + 1) • comp (ascPochhammer S n) (X + 1)

Next tactic:
suffices (ascPochhammer ℕ (n + 1)).comp (X + 1) =
      ascPochhammer ℕ (n + 1) + (n + 1) * (ascPochhammer ℕ n).comp (X + 1)
    by simpa [map_comp] using congr_arg (Polynomial.map (Nat.castRingHom S)) this
theorem ascPochhammer_succ_comp_X_add_one (n : ℕ) :
    (ascPochhammer S (n + 1)).comp (X + 1) =
      ascPochhammer S (n + 1) + (n + 1) • (ascPochhammer S n).comp (X + 1) := by
  suffices (ascPochhammer ℕ (n + 1)).comp (X + 1) =
      ascPochhammer ℕ (n + 1) + (n + 1) * (ascPochhammer ℕ n).comp (X + 1)
    by 

Proof state:
S : Type u
inst✝ : Semiring S
n : ℕ
this : comp (ascPochhammer ℕ (n + 1)) (X + 1) = ascPochhammer ℕ (n + 1) + (↑n + 1) * comp (ascPochhammer ℕ n) (X + 1)
⊢ comp (ascPochhammer S (n + 1)) (X + 1) = ascPochhammer S (n + 1) + (n + 1) • comp (ascPochhammer S n) (X + 1)

Next tactic:
simpa [map_comp] using congr_arg (Polynomial.map (Nat.castRingHom S)) this
theorem ascPochhammer_succ_comp_X_add_one (n : ℕ) :
    (ascPochhammer S (n + 1)).comp (X + 1) =
      ascPochhammer S (n + 1) + (n + 1) • (ascPochhammer S n).comp (X + 1) := by
  suffices (ascPochhammer ℕ (n + 1)).comp (X + 1) =
      ascPochhammer ℕ (n + 1) + (n + 1) * (ascPochhammer ℕ n).comp (X + 1)
    by simpa [map_comp] using congr_arg (Polynomial.map (Nat.castRingHom S)) this
  

Proof state:
S : Type u
inst✝ : Semiring S
n : ℕ
⊢ comp (ascPochhammer ℕ (n + 1)) (X + 1) = ascPochhammer ℕ (n + 1) + (↑n + 1) * comp (ascPochhammer ℕ n) (X + 1)

Next tactic:
nth_rw 2 [ascPochhammer_succ_left]
theorem ascPochhammer_succ_comp_X_add_one (n : ℕ) :
    (ascPochhammer S (n + 1)).comp (X + 1) =
      ascPochhammer S (n + 1) + (n + 1) • (ascPochhammer S n).comp (X + 1) := by
  suffices (ascPochhammer ℕ (n + 1)).comp (X + 1) =
      ascPochhammer ℕ (n + 1) + (n + 1) * (ascPochhammer ℕ n).comp (X + 1)
    by simpa [map_comp] using congr_arg (Polynomial.map (Nat.castRingHom S)) this
  nth_rw 2 [ascPochhammer_succ_left]
  

Proof state:
S : Type u
inst✝ : Semiring S
n : ℕ
⊢ comp (ascPochhammer ℕ (n + 1)) (X + 1) =
    X * comp (ascPochhammer ℕ n) (X + 1) + (↑n + 1) * comp (ascPochhammer ℕ n) (X + 1)

Next tactic:
rw [← add_mul, ascPochhammer_succ_right ℕ n, mul_comp, mul_comm, add_comp, X_comp, nat_cast_comp,
    add_comm, ← add_assoc]
theorem ascPochhammer_succ_comp_X_add_one (n : ℕ) :
    (ascPochhammer S (n + 1)).comp (X + 1) =
      ascPochhammer S (n + 1) + (n + 1) • (ascPochhammer S n).comp (X + 1) := by
  suffices (ascPochhammer ℕ (n + 1)).comp (X + 1) =
      ascPochhammer ℕ (n + 1) + (n + 1) * (ascPochhammer ℕ n).comp (X + 1)
    by simpa [map_comp] using congr_arg (Polynomial.map (Nat.castRingHom S)) this
  nth_rw 2 [ascPochhammer_succ_left]
  rw [← add_mul, ascPochhammer_succ_right ℕ n, mul_comp, mul_comm, add_comp, X_comp, nat_cast_comp,
    add_comm, ← add_assoc]
  

Proof state:
S : Type u
inst✝ : Semiring S
n : ℕ
⊢ (↑n + X + 1) * comp (ascPochhammer ℕ n) (X + 1) = (X + (↑n + 1)) * comp (ascPochhammer ℕ n) (X + 1)

Next tactic:
ring
theorem ascPochhammer_mul (n m : ℕ) :
    ascPochhammer S n * (ascPochhammer S m).comp (X + (n : S[X])) = ascPochhammer S (n + m) := by
  

Proof state:
S : Type u
inst✝ : Semiring S
n m : ℕ
⊢ ascPochhammer S n * comp (ascPochhammer S m) (X + ↑n) = ascPochhammer S (n + m)

Next tactic:
induction' m with m ih
theorem ascPochhammer_mul (n m : ℕ) :
    ascPochhammer S n * (ascPochhammer S m).comp (X + (n : S[X])) = ascPochhammer S (n + m) := by
  induction' m with m ih
  · 

Proof state:
case zero
S : Type u
inst✝ : Semiring S
n : ℕ
⊢ ascPochhammer S n * comp (ascPochhammer S Nat.zero) (X + ↑n) = ascPochhammer S (n + Nat.zero)

Next tactic:
simp
theorem ascPochhammer_mul (n m : ℕ) :
    ascPochhammer S n * (ascPochhammer S m).comp (X + (n : S[X])) = ascPochhammer S (n + m) := by
  induction' m with m ih
  · simp
  · 

Proof state:
case succ
S : Type u
inst✝ : Semiring S
n m : ℕ
ih : ascPochhammer S n * comp (ascPochhammer S m) (X + ↑n) = ascPochhammer S (n + m)
⊢ ascPochhammer S n * comp (ascPochhammer S (Nat.succ m)) (X + ↑n) = ascPochhammer S (n + Nat.succ m)

Next tactic:
rw [ascPochhammer_succ_right, Polynomial.mul_X_add_nat_cast_comp, ← mul_assoc, ih,
      Nat.succ_eq_add_one, ← add_assoc, ascPochhammer_succ_right, Nat.cast_add, add_assoc]
theorem ascPochhammer_nat_eq_ascFactorial (n : ℕ) :
    ∀ k, (ascPochhammer ℕ k).eval (n + 1) = n.ascFactorial k
  | 0 => by 

Proof state:
S : Type u
inst✝ : Semiring S
n : ℕ
⊢ eval (n + 1) (ascPochhammer ℕ 0) = Nat.ascFactorial n 0

Next tactic:
rw [ascPochhammer_zero, eval_one, Nat.ascFactorial_zero]
theorem ascPochhammer_nat_eq_ascFactorial (n : ℕ) :
    ∀ k, (ascPochhammer ℕ k).eval (n + 1) = n.ascFactorial k
  | 0 => by rw [ascPochhammer_zero, eval_one, Nat.ascFactorial_zero]
  | t + 1 => by
    

Proof state:
S : Type u
inst✝ : Semiring S
n t : ℕ
⊢ eval (n + 1) (ascPochhammer ℕ (t + 1)) = Nat.ascFactorial n (t + 1)

Next tactic:
rw [ascPochhammer_succ_right, eval_mul, ascPochhammer_nat_eq_ascFactorial n t]
theorem ascPochhammer_nat_eq_ascFactorial (n : ℕ) :
    ∀ k, (ascPochhammer ℕ k).eval (n + 1) = n.ascFactorial k
  | 0 => by rw [ascPochhammer_zero, eval_one, Nat.ascFactorial_zero]
  | t + 1 => by
    rw [ascPochhammer_succ_right, eval_mul, ascPochhammer_nat_eq_ascFactorial n t]
    

Proof state:
S : Type u
inst✝ : Semiring S
n t : ℕ
⊢ Nat.ascFactorial n t * eval (n + 1) (X + ↑t) = Nat.ascFactorial n (t + 1)

Next tactic:
simp only [eval_add, eval_X, eval_nat_cast, Nat.cast_id]
theorem ascPochhammer_nat_eq_ascFactorial (n : ℕ) :
    ∀ k, (ascPochhammer ℕ k).eval (n + 1) = n.ascFactorial k
  | 0 => by rw [ascPochhammer_zero, eval_one, Nat.ascFactorial_zero]
  | t + 1 => by
    rw [ascPochhammer_succ_right, eval_mul, ascPochhammer_nat_eq_ascFactorial n t]
    simp only [eval_add, eval_X, eval_nat_cast, Nat.cast_id]
    

Proof state:
S : Type u
inst✝ : Semiring S
n t : ℕ
⊢ Nat.ascFactorial n t * (n + 1 + t) = Nat.ascFactorial n (t + 1)

Next tactic:
rw [Nat.ascFactorial_succ, add_right_comm, mul_comm]
theorem ascPochhammer_nat_eq_descFactorial (a b : ℕ) :
    (ascPochhammer ℕ b).eval a = (a + b - 1).descFactorial b := by
  

Proof state:
S : Type u
inst✝ : Semiring S
a b : ℕ
⊢ eval a (ascPochhammer ℕ b) = Nat.descFactorial (a + b - 1) b

Next tactic:
cases' b with b
theorem ascPochhammer_nat_eq_descFactorial (a b : ℕ) :
    (ascPochhammer ℕ b).eval a = (a + b - 1).descFactorial b := by
  cases' b with b
  · 

Proof state:
case zero
S : Type u
inst✝ : Semiring S
a : ℕ
⊢ eval a (ascPochhammer ℕ Nat.zero) = Nat.descFactorial (a + Nat.zero - 1) Nat.zero

Next tactic:
rw [Nat.descFactorial_zero, ascPochhammer_zero, Polynomial.eval_one]
theorem ascPochhammer_nat_eq_descFactorial (a b : ℕ) :
    (ascPochhammer ℕ b).eval a = (a + b - 1).descFactorial b := by
  cases' b with b
  · rw [Nat.descFactorial_zero, ascPochhammer_zero, Polynomial.eval_one]
  

Proof state:
case succ
S : Type u
inst✝ : Semiring S
a b : ℕ
⊢ eval a (ascPochhammer ℕ (Nat.succ b)) = Nat.descFactorial (a + Nat.succ b - 1) (Nat.succ b)

Next tactic:
rw [Nat.add_succ, Nat.succ_sub_succ, tsub_zero]
theorem ascPochhammer_nat_eq_descFactorial (a b : ℕ) :
    (ascPochhammer ℕ b).eval a = (a + b - 1).descFactorial b := by
  cases' b with b
  · rw [Nat.descFactorial_zero, ascPochhammer_zero, Polynomial.eval_one]
  rw [Nat.add_succ, Nat.succ_sub_succ, tsub_zero]
  

Proof state:
case succ
S : Type u
inst✝ : Semiring S
a b : ℕ
⊢ eval a (ascPochhammer ℕ (Nat.succ b)) = Nat.descFactorial (a + b) (Nat.succ b)

Next tactic:
cases a
theorem ascPochhammer_nat_eq_descFactorial (a b : ℕ) :
    (ascPochhammer ℕ b).eval a = (a + b - 1).descFactorial b := by
  cases' b with b
  · rw [Nat.descFactorial_zero, ascPochhammer_zero, Polynomial.eval_one]
  rw [Nat.add_succ, Nat.succ_sub_succ, tsub_zero]
  cases a
  · 

Proof state:
case succ.zero
S : Type u
inst✝ : Semiring S
b : ℕ
⊢ eval Nat.zero (ascPochhammer ℕ (Nat.succ b)) = Nat.descFactorial (Nat.zero + b) (Nat.succ b)

Next tactic:
simp only [Nat.zero_eq, ne_eq, Nat.succ_ne_zero, not_false_iff, ascPochhammer_ne_zero_eval_zero,
    zero_add, Nat.descFactorial_succ, le_refl, tsub_eq_zero_of_le, zero_mul]
theorem ascPochhammer_nat_eq_descFactorial (a b : ℕ) :
    (ascPochhammer ℕ b).eval a = (a + b - 1).descFactorial b := by
  cases' b with b
  · rw [Nat.descFactorial_zero, ascPochhammer_zero, Polynomial.eval_one]
  rw [Nat.add_succ, Nat.succ_sub_succ, tsub_zero]
  cases a
  · simp only [Nat.zero_eq, ne_eq, Nat.succ_ne_zero, not_false_iff, ascPochhammer_ne_zero_eval_zero,
    zero_add, Nat.descFactorial_succ, le_refl, tsub_eq_zero_of_le, zero_mul]
  · 

Proof state:
case succ.succ
S : Type u
inst✝ : Semiring S
b n✝ : ℕ
⊢ eval (Nat.succ n✝) (ascPochhammer ℕ (Nat.succ b)) = Nat.descFactorial (Nat.succ n✝ + b) (Nat.succ b)

Next tactic:
rw [Nat.succ_add, ← Nat.add_succ, Nat.add_descFactorial_eq_ascFactorial,
      ascPochhammer_nat_eq_ascFactorial]
@[simp]
theorem ascPochhammer_natDegree (n : ℕ) [NoZeroDivisors S] [Nontrivial S] :
    (ascPochhammer S n).natDegree = n := by
  

Proof state:
S : Type u
inst✝² : Semiring S
n : ℕ
inst✝¹ : NoZeroDivisors S
inst✝ : Nontrivial S
⊢ natDegree (ascPochhammer S n) = n

Next tactic:
induction' n with n hn
@[simp]
theorem ascPochhammer_natDegree (n : ℕ) [NoZeroDivisors S] [Nontrivial S] :
    (ascPochhammer S n).natDegree = n := by
  induction' n with n hn
  · 

Proof state:
case zero
S : Type u
inst✝² : Semiring S
inst✝¹ : NoZeroDivisors S
inst✝ : Nontrivial S
⊢ natDegree (ascPochhammer S Nat.zero) = Nat.zero

Next tactic:
simp
@[simp]
theorem ascPochhammer_natDegree (n : ℕ) [NoZeroDivisors S] [Nontrivial S] :
    (ascPochhammer S n).natDegree = n := by
  induction' n with n hn
  · simp
  · 

Proof state:
case succ
S : Type u
inst✝² : Semiring S
inst✝¹ : NoZeroDivisors S
inst✝ : Nontrivial S
n : ℕ
hn : natDegree (ascPochhammer S n) = n
⊢ natDegree (ascPochhammer S (Nat.succ n)) = Nat.succ n

Next tactic:
have : natDegree (X + (n : S[X])) = 1 := natDegree_X_add_C (n : S)
@[simp]
theorem ascPochhammer_natDegree (n : ℕ) [NoZeroDivisors S] [Nontrivial S] :
    (ascPochhammer S n).natDegree = n := by
  induction' n with n hn
  · simp
  · have : natDegree (X + (n : S[X])) = 1 := natDegree_X_add_C (n : S)
    

Proof state:
case succ
S : Type u
inst✝² : Semiring S
inst✝¹ : NoZeroDivisors S
inst✝ : Nontrivial S
n : ℕ
hn : natDegree (ascPochhammer S n) = n
this : natDegree (X + ↑n) = 1
⊢ natDegree (ascPochhammer S (Nat.succ n)) = Nat.succ n

Next tactic:
rw [ascPochhammer_succ_right,
        natDegree_mul _ (ne_zero_of_natDegree_gt <| this.symm ▸ Nat.zero_lt_one), hn, this]
@[simp]
theorem ascPochhammer_natDegree (n : ℕ) [NoZeroDivisors S] [Nontrivial S] :
    (ascPochhammer S n).natDegree = n := by
  induction' n with n hn
  · simp
  · have : natDegree (X + (n : S[X])) = 1 := natDegree_X_add_C (n : S)
    rw [ascPochhammer_succ_right,
        natDegree_mul _ (ne_zero_of_natDegree_gt <| this.symm ▸ Nat.zero_lt_one), hn, this]
    

Proof state:
S : Type u
inst✝² : Semiring S
inst✝¹ : NoZeroDivisors S
inst✝ : Nontrivial S
n : ℕ
hn : natDegree (ascPochhammer S n) = n
this : natDegree (X + ↑n) = 1
⊢ ascPochhammer S n ≠ 0

Next tactic:
cases n
@[simp]
theorem ascPochhammer_natDegree (n : ℕ) [NoZeroDivisors S] [Nontrivial S] :
    (ascPochhammer S n).natDegree = n := by
  induction' n with n hn
  · simp
  · have : natDegree (X + (n : S[X])) = 1 := natDegree_X_add_C (n : S)
    rw [ascPochhammer_succ_right,
        natDegree_mul _ (ne_zero_of_natDegree_gt <| this.symm ▸ Nat.zero_lt_one), hn, this]
    cases n
    · 

Proof state:
case zero
S : Type u
inst✝² : Semiring S
inst✝¹ : NoZeroDivisors S
inst✝ : Nontrivial S
hn : natDegree (ascPochhammer S Nat.zero) = Nat.zero
this : natDegree (X + ↑Nat.zero) = 1
⊢ ascPochhammer S Nat.zero ≠ 0

Next tactic:
simp
@[simp]
theorem ascPochhammer_natDegree (n : ℕ) [NoZeroDivisors S] [Nontrivial S] :
    (ascPochhammer S n).natDegree = n := by
  induction' n with n hn
  · simp
  · have : natDegree (X + (n : S[X])) = 1 := natDegree_X_add_C (n : S)
    rw [ascPochhammer_succ_right,
        natDegree_mul _ (ne_zero_of_natDegree_gt <| this.symm ▸ Nat.zero_lt_one), hn, this]
    cases n
    · simp
    · 

Proof state:
case succ
S : Type u
inst✝² : Semiring S
inst✝¹ : NoZeroDivisors S
inst✝ : Nontrivial S
n✝ : ℕ
hn : natDegree (ascPochhammer S (Nat.succ n✝)) = Nat.succ n✝
this : natDegree (X + ↑(Nat.succ n✝)) = 1
⊢ ascPochhammer S (Nat.succ n✝) ≠ 0

Next tactic:
refine' ne_zero_of_natDegree_gt <| hn.symm ▸ Nat.succ_pos _
theorem ascPochhammer_pos (n : ℕ) (s : S) (h : 0 < s) : 0 < (ascPochhammer S n).eval s := by
  

Proof state:
S : Type u_1
inst✝ : StrictOrderedSemiring S
n : ℕ
s : S
h : 0 < s
⊢ 0 < eval s (ascPochhammer S n)

Next tactic:
induction' n with n ih
theorem ascPochhammer_pos (n : ℕ) (s : S) (h : 0 < s) : 0 < (ascPochhammer S n).eval s := by
  induction' n with n ih
  · 

Proof state:
case zero
S : Type u_1
inst✝ : StrictOrderedSemiring S
s : S
h : 0 < s
⊢ 0 < eval s (ascPochhammer S Nat.zero)

Next tactic:
simp only [Nat.zero_eq, ascPochhammer_zero, eval_one]
theorem ascPochhammer_pos (n : ℕ) (s : S) (h : 0 < s) : 0 < (ascPochhammer S n).eval s := by
  induction' n with n ih
  · simp only [Nat.zero_eq, ascPochhammer_zero, eval_one]
    

Proof state:
case zero
S : Type u_1
inst✝ : StrictOrderedSemiring S
s : S
h : 0 < s
⊢ 0 < 1

Next tactic:
exact zero_lt_one
theorem ascPochhammer_pos (n : ℕ) (s : S) (h : 0 < s) : 0 < (ascPochhammer S n).eval s := by
  induction' n with n ih
  · simp only [Nat.zero_eq, ascPochhammer_zero, eval_one]
    exact zero_lt_one
  · 

Proof state:
case succ
S : Type u_1
inst✝ : StrictOrderedSemiring S
s : S
h : 0 < s
n : ℕ
ih : 0 < eval s (ascPochhammer S n)
⊢ 0 < eval s (ascPochhammer S (Nat.succ n))

Next tactic:
rw [ascPochhammer_succ_right, mul_add, eval_add, ← Nat.cast_comm, eval_nat_cast_mul, eval_mul_X,
      Nat.cast_comm, ← mul_add]
theorem ascPochhammer_pos (n : ℕ) (s : S) (h : 0 < s) : 0 < (ascPochhammer S n).eval s := by
  induction' n with n ih
  · simp only [Nat.zero_eq, ascPochhammer_zero, eval_one]
    exact zero_lt_one
  · rw [ascPochhammer_succ_right, mul_add, eval_add, ← Nat.cast_comm, eval_nat_cast_mul, eval_mul_X,
      Nat.cast_comm, ← mul_add]
    

Proof state:
case succ
S : Type u_1
inst✝ : StrictOrderedSemiring S
s : S
h : 0 < s
n : ℕ
ih : 0 < eval s (ascPochhammer S n)
⊢ 0 < eval s (ascPochhammer S n) * (s + ↑n)

Next tactic:
exact mul_pos ih (lt_of_lt_of_le h ((le_add_iff_nonneg_right _).mpr (Nat.cast_nonneg n)))
@[simp]
theorem ascPochhammer_eval_one (S : Type*) [Semiring S] (n : ℕ) :
    (ascPochhammer S n).eval (1 : S) = (n ! : S) := by
  

Proof state:
S✝ : Type u_1
inst✝¹ : Semiring S✝
r n✝ : ℕ
S : Type u_2
inst✝ : Semiring S
n : ℕ
⊢ eval 1 (ascPochhammer S n) = ↑n !

Next tactic:
rw_mod_cast [ascPochhammer_nat_eq_ascFactorial, Nat.zero_ascFactorial]
theorem factorial_mul_ascPochhammer (S : Type*) [Semiring S] (r n : ℕ) :
    (r ! : S) * (ascPochhammer S n).eval (r + 1 : S) = (r + n)! := by
  

Proof state:
S✝ : Type u_1
inst✝¹ : Semiring S✝
r✝ n✝ : ℕ
S : Type u_2
inst✝ : Semiring S
r n : ℕ
⊢ ↑r ! * eval (↑r + 1) (ascPochhammer S n) = ↑(r + n)!

Next tactic:
rw_mod_cast [ascPochhammer_nat_eq_ascFactorial, Nat.factorial_mul_ascFactorial]
theorem ascPochhammer_nat_eval_succ (r : ℕ) :
    ∀ n : ℕ, n * (ascPochhammer ℕ r).eval (n + 1) = (n + r) * (ascPochhammer ℕ r).eval n
  | 0 => by
    

Proof state:
S : Type u_1
inst✝ : Semiring S
r✝ n r : ℕ
⊢ 0 * eval (0 + 1) (ascPochhammer ℕ r) = (0 + r) * eval 0 (ascPochhammer ℕ r)

Next tactic:
by_cases h : r = 0
theorem ascPochhammer_nat_eval_succ (r : ℕ) :
    ∀ n : ℕ, n * (ascPochhammer ℕ r).eval (n + 1) = (n + r) * (ascPochhammer ℕ r).eval n
  | 0 => by
    by_cases h : r = 0
    · 

Proof state:
case pos
S : Type u_1
inst✝ : Semiring S
r✝ n r : ℕ
h : r = 0
⊢ 0 * eval (0 + 1) (ascPochhammer ℕ r) = (0 + r) * eval 0 (ascPochhammer ℕ r)

Next tactic:
simp only [h, zero_mul, zero_add]
theorem ascPochhammer_nat_eval_succ (r : ℕ) :
    ∀ n : ℕ, n * (ascPochhammer ℕ r).eval (n + 1) = (n + r) * (ascPochhammer ℕ r).eval n
  | 0 => by
    by_cases h : r = 0
    · simp only [h, zero_mul, zero_add]
    · 

Proof state:
case neg
S : Type u_1
inst✝ : Semiring S
r✝ n r : ℕ
h : ¬r = 0
⊢ 0 * eval (0 + 1) (ascPochhammer ℕ r) = (0 + r) * eval 0 (ascPochhammer ℕ r)

Next tactic:
simp only [ascPochhammer_eval_zero, zero_mul, if_neg h, mul_zero]
theorem ascPochhammer_nat_eval_succ (r : ℕ) :
    ∀ n : ℕ, n * (ascPochhammer ℕ r).eval (n + 1) = (n + r) * (ascPochhammer ℕ r).eval n
  | 0 => by
    by_cases h : r = 0
    · simp only [h, zero_mul, zero_add]
    · simp only [ascPochhammer_eval_zero, zero_mul, if_neg h, mul_zero]
  | k + 1 => by 

Proof state:
S : Type u_1
inst✝ : Semiring S
r✝ n r k : ℕ
⊢ (k + 1) * eval (k + 1 + 1) (ascPochhammer ℕ r) = (k + 1 + r) * eval (k + 1) (ascPochhammer ℕ r)

Next tactic:
simp only [ascPochhammer_nat_eq_ascFactorial, Nat.succ_ascFactorial, add_right_comm]
@[simp]
theorem descPochhammer_one : descPochhammer R 1 = X := by 

Proof state:
R : Type u
inst✝ : Ring R
⊢ descPochhammer R 1 = X

Next tactic:
simp [descPochhammer]
theorem descPochhammer_succ_left (n : ℕ) :
    descPochhammer R (n + 1) = X * (descPochhammer R n).comp (X - 1) :=
  by 

Proof state:
R : Type u
inst✝ : Ring R
n : ℕ
⊢ descPochhammer R (n + 1) = X * comp (descPochhammer R n) (X - 1)

Next tactic:
rw [descPochhammer]
theorem monic_descPochhammer (n : ℕ) [Nontrivial R] [NoZeroDivisors R] :
    Monic <| descPochhammer R n := by
  

Proof state:
R : Type u
inst✝² : Ring R
n : ℕ
inst✝¹ : Nontrivial R
inst✝ : NoZeroDivisors R
⊢ Monic (descPochhammer R n)

Next tactic:
induction' n with n hn
theorem monic_descPochhammer (n : ℕ) [Nontrivial R] [NoZeroDivisors R] :
    Monic <| descPochhammer R n := by
  induction' n with n hn
  · 

Proof state:
case zero
R : Type u
inst✝² : Ring R
inst✝¹ : Nontrivial R
inst✝ : NoZeroDivisors R
⊢ Monic (descPochhammer R Nat.zero)

Next tactic:
simp
theorem monic_descPochhammer (n : ℕ) [Nontrivial R] [NoZeroDivisors R] :
    Monic <| descPochhammer R n := by
  induction' n with n hn
  · simp
  · 

Proof state:
case succ
R : Type u
inst✝² : Ring R
inst✝¹ : Nontrivial R
inst✝ : NoZeroDivisors R
n : ℕ
hn : Monic (descPochhammer R n)
⊢ Monic (descPochhammer R (Nat.succ n))

Next tactic:
have h : leadingCoeff (X - 1 : R[X]) = 1 := leadingCoeff_X_sub_C 1
theorem monic_descPochhammer (n : ℕ) [Nontrivial R] [NoZeroDivisors R] :
    Monic <| descPochhammer R n := by
  induction' n with n hn
  · simp
  · have h : leadingCoeff (X - 1 : R[X]) = 1 := leadingCoeff_X_sub_C 1
    

Proof state:
case succ
R : Type u
inst✝² : Ring R
inst✝¹ : Nontrivial R
inst✝ : NoZeroDivisors R
n : ℕ
hn : Monic (descPochhammer R n)
h : leadingCoeff (X - 1) = 1
⊢ Monic (descPochhammer R (Nat.succ n))

Next tactic:
have : natDegree (X - (1 : R[X])) ≠ 0 := ne_zero_of_eq_one <| natDegree_X_sub_C (1 : R)