l3lab/ntp-mathlib huggingface dataset:
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
    have : natDegree (X - (1 : R[X])) ≠ 0 := ne_zero_of_eq_one <| natDegree_X_sub_C (1 : R)
    

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
this : natDegree (X - 1) ≠ 0
⊢ Monic (descPochhammer R (Nat.succ n))

Next tactic:
rw [descPochhammer_succ_left, Monic.def, leadingCoeff_mul, leadingCoeff_comp this, hn, monic_X,
        one_mul, one_mul, h, one_pow]
@[simp]
theorem descPochhammer_map (f : R →+* T) (n : ℕ) :
    (descPochhammer R n).map f = descPochhammer T n := by
  

Proof state:
R : Type u
inst✝¹ : Ring R
T : Type v
inst✝ : Ring T
f : R →+* T
n : ℕ
⊢ map f (descPochhammer R n) = descPochhammer T n

Next tactic:
induction' n with n ih
@[simp]
theorem descPochhammer_map (f : R →+* T) (n : ℕ) :
    (descPochhammer R n).map f = descPochhammer T n := by
  induction' n with n ih
  · 

Proof state:
case zero
R : Type u
inst✝¹ : Ring R
T : Type v
inst✝ : Ring T
f : R →+* T
⊢ map f (descPochhammer R Nat.zero) = descPochhammer T Nat.zero

Next tactic:
simp
@[simp]
theorem descPochhammer_map (f : R →+* T) (n : ℕ) :
    (descPochhammer R n).map f = descPochhammer T n := by
  induction' n with n ih
  · simp
  · 

Proof state:
case succ
R : Type u
inst✝¹ : Ring R
T : Type v
inst✝ : Ring T
f : R →+* T
n : ℕ
ih : map f (descPochhammer R n) = descPochhammer T n
⊢ map f (descPochhammer R (Nat.succ n)) = descPochhammer T (Nat.succ n)

Next tactic:
simp [ih, descPochhammer_succ_left, map_comp]
@[simp, norm_cast]
theorem descPochhammer_eval_cast (n : ℕ) (k : ℤ) :
    (((descPochhammer ℤ n).eval k : ℤ) : R) = ((descPochhammer R n).eval k : R) := by
  

Proof state:
R : Type u
inst✝ : Ring R
n : ℕ
k : ℤ
⊢ ↑(eval k (descPochhammer ℤ n)) = eval (↑k) (descPochhammer R n)

Next tactic:
rw [← descPochhammer_map (algebraMap ℤ R), eval_map, ← eq_intCast (algebraMap ℤ R)]
@[simp, norm_cast]
theorem descPochhammer_eval_cast (n : ℕ) (k : ℤ) :
    (((descPochhammer ℤ n).eval k : ℤ) : R) = ((descPochhammer R n).eval k : R) := by
  rw [← descPochhammer_map (algebraMap ℤ R), eval_map, ← eq_intCast (algebraMap ℤ R)]
  

Proof state:
R : Type u
inst✝ : Ring R
n : ℕ
k : ℤ
⊢ (algebraMap ℤ R) (eval k (descPochhammer ℤ n)) = eval₂ (algebraMap ℤ R) (↑k) (descPochhammer ℤ n)

Next tactic:
simp only [algebraMap_int_eq, eq_intCast, eval₂_at_int_cast, Nat.cast_id, eq_natCast, Int.cast_id]
theorem descPochhammer_eval_zero {n : ℕ} :
    (descPochhammer R n).eval 0 = if n = 0 then 1 else 0 := by
  

Proof state:
R : Type u
inst✝ : Ring R
n : ℕ
⊢ eval 0 (descPochhammer R n) = if n = 0 then 1 else 0

Next tactic:
cases n
theorem descPochhammer_eval_zero {n : ℕ} :
    (descPochhammer R n).eval 0 = if n = 0 then 1 else 0 := by
  cases n
  · 

Proof state:
case zero
R : Type u
inst✝ : Ring R
⊢ eval 0 (descPochhammer R Nat.zero) = if Nat.zero = 0 then 1 else 0

Next tactic:
simp
theorem descPochhammer_eval_zero {n : ℕ} :
    (descPochhammer R n).eval 0 = if n = 0 then 1 else 0 := by
  cases n
  · simp
  · 

Proof state:
case succ
R : Type u
inst✝ : Ring R
n✝ : ℕ
⊢ eval 0 (descPochhammer R (Nat.succ n✝)) = if Nat.succ n✝ = 0 then 1 else 0

Next tactic:
simp [X_mul, Nat.succ_ne_zero, descPochhammer_succ_left]
theorem descPochhammer_zero_eval_zero : (descPochhammer R 0).eval 0 = 1 := by 

Proof state:
R : Type u
inst✝ : Ring R
⊢ eval 0 (descPochhammer R 0) = 1

Next tactic:
simp
@[simp]
theorem descPochhammer_ne_zero_eval_zero {n : ℕ} (h : n ≠ 0) : (descPochhammer R n).eval 0 = 0 := by
  

Proof state:
R : Type u
inst✝ : Ring R
n : ℕ
h : n ≠ 0
⊢ eval 0 (descPochhammer R n) = 0

Next tactic:
simp [descPochhammer_eval_zero, h]
theorem descPochhammer_succ_right (n : ℕ) :
    descPochhammer R (n + 1) = descPochhammer R n * (X - (n : R[X])) := by
  

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

Next tactic:
suffices h : descPochhammer ℤ (n + 1) = descPochhammer ℤ n * (X - (n : ℤ[X]))
theorem descPochhammer_succ_right (n : ℕ) :
    descPochhammer R (n + 1) = descPochhammer R n * (X - (n : R[X])) := by
  suffices h : descPochhammer ℤ (n + 1) = descPochhammer ℤ n * (X - (n : ℤ[X]))
  · 

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

Next tactic:
apply_fun Polynomial.map (algebraMap ℤ R) at h
theorem descPochhammer_succ_right (n : ℕ) :
    descPochhammer R (n + 1) = descPochhammer R n * (X - (n : R[X])) := by
  suffices h : descPochhammer ℤ (n + 1) = descPochhammer ℤ n * (X - (n : ℤ[X]))
  · apply_fun Polynomial.map (algebraMap ℤ R) at h
    

Proof state:
R : Type u
inst✝ : Ring R
n : ℕ
h : map (algebraMap ℤ R) (descPochhammer ℤ (n + 1)) = map (algebraMap ℤ R) (descPochhammer ℤ n * (X - ↑n))
⊢ descPochhammer R (n + 1) = descPochhammer R n * (X - ↑n)

Next tactic:
simpa [descPochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
      Polynomial.map_int_cast] using h
theorem descPochhammer_succ_right (n : ℕ) :
    descPochhammer R (n + 1) = descPochhammer R n * (X - (n : R[X])) := by
  suffices h : descPochhammer ℤ (n + 1) = descPochhammer ℤ n * (X - (n : ℤ[X]))
  · apply_fun Polynomial.map (algebraMap ℤ R) at h
    simpa [descPochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
      Polynomial.map_int_cast] using h
  

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

Next tactic:
induction' n with n ih
theorem descPochhammer_succ_right (n : ℕ) :
    descPochhammer R (n + 1) = descPochhammer R n * (X - (n : R[X])) := by
  suffices h : descPochhammer ℤ (n + 1) = descPochhammer ℤ n * (X - (n : ℤ[X]))
  · apply_fun Polynomial.map (algebraMap ℤ R) at h
    simpa [descPochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
      Polynomial.map_int_cast] using h
  induction' n with n ih
  · 

Proof state:
case h.zero
R : Type u
inst✝ : Ring R
⊢ descPochhammer ℤ (Nat.zero + 1) = descPochhammer ℤ Nat.zero * (X - ↑Nat.zero)

Next tactic:
simp [descPochhammer]
theorem descPochhammer_succ_right (n : ℕ) :
    descPochhammer R (n + 1) = descPochhammer R n * (X - (n : R[X])) := by
  suffices h : descPochhammer ℤ (n + 1) = descPochhammer ℤ n * (X - (n : ℤ[X]))
  · apply_fun Polynomial.map (algebraMap ℤ R) at h
    simpa [descPochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
      Polynomial.map_int_cast] using h
  induction' n with n ih
  · simp [descPochhammer]
  · 

Proof state:
case h.succ
R : Type u
inst✝ : Ring R
n : ℕ
ih : descPochhammer ℤ (n + 1) = descPochhammer ℤ n * (X - ↑n)
⊢ descPochhammer ℤ (Nat.succ n + 1) = descPochhammer ℤ (Nat.succ n) * (X - ↑(Nat.succ n))

Next tactic:
conv_lhs =>
      rw [descPochhammer_succ_left, ih, mul_comp, ← mul_assoc, ← descPochhammer_succ_left, sub_comp,
          X_comp, nat_cast_comp]
theorem descPochhammer_succ_right (n : ℕ) :
    descPochhammer R (n + 1) = descPochhammer R n * (X - (n : R[X])) := by
  suffices h : descPochhammer ℤ (n + 1) = descPochhammer ℤ n * (X - (n : ℤ[X]))
  · apply_fun Polynomial.map (algebraMap ℤ R) at h
    simpa [descPochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
      Polynomial.map_int_cast] using h
  induction' n with n ih
  · simp [descPochhammer]
  · conv_lhs =>
      

Proof state:
R : Type u
inst✝ : Ring R
n : ℕ
ih : descPochhammer ℤ (n + 1) = descPochhammer ℤ n * (X - ↑n)
| descPochhammer ℤ (Nat.succ n + 1)

Next tactic:
rw [descPochhammer_succ_left, ih, mul_comp, ← mul_assoc, ← descPochhammer_succ_left, sub_comp,
          X_comp, nat_cast_comp]
theorem descPochhammer_succ_right (n : ℕ) :
    descPochhammer R (n + 1) = descPochhammer R n * (X - (n : R[X])) := by
  suffices h : descPochhammer ℤ (n + 1) = descPochhammer ℤ n * (X - (n : ℤ[X]))
  · apply_fun Polynomial.map (algebraMap ℤ R) at h
    simpa [descPochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
      Polynomial.map_int_cast] using h
  induction' n with n ih
  · simp [descPochhammer]
  · conv_lhs =>
      rw [descPochhammer_succ_left, ih, mul_comp, ← mul_assoc, ← descPochhammer_succ_left, sub_comp,
          X_comp, nat_cast_comp]
    

Proof state:
case h.succ
R : Type u
inst✝ : Ring R
n : ℕ
ih : descPochhammer ℤ (n + 1) = descPochhammer ℤ n * (X - ↑n)
⊢ descPochhammer ℤ (n + 1) * (X - 1 - ↑n) = descPochhammer ℤ (Nat.succ n) * (X - ↑(Nat.succ n))

Next tactic:
nth_rw 1 [Nat.succ_eq_add_one]
theorem descPochhammer_succ_right (n : ℕ) :
    descPochhammer R (n + 1) = descPochhammer R n * (X - (n : R[X])) := by
  suffices h : descPochhammer ℤ (n + 1) = descPochhammer ℤ n * (X - (n : ℤ[X]))
  · apply_fun Polynomial.map (algebraMap ℤ R) at h
    simpa [descPochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
      Polynomial.map_int_cast] using h
  induction' n with n ih
  · simp [descPochhammer]
  · conv_lhs =>
      rw [descPochhammer_succ_left, ih, mul_comp, ← mul_assoc, ← descPochhammer_succ_left, sub_comp,
          X_comp, nat_cast_comp]
    nth_rw 1 [Nat.succ_eq_add_one]
    

Proof state:
case h.succ
R : Type u
inst✝ : Ring R
n : ℕ
ih : descPochhammer ℤ (n + 1) = descPochhammer ℤ n * (X - ↑n)
⊢ descPochhammer ℤ (n + 1) * (X - 1 - ↑n) = descPochhammer ℤ (n + 1) * (X - ↑(Nat.succ n))

Next tactic:
rw [Nat.succ_eq_one_add, Nat.cast_add, Nat.cast_one, sub_add_eq_sub_sub]
@[simp]
theorem descPochhammer_natDegree (n : ℕ) [NoZeroDivisors R] [Nontrivial R] :
    (descPochhammer R n).natDegree = n := by
  

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

Next tactic:
induction' n with n hn
@[simp]
theorem descPochhammer_natDegree (n : ℕ) [NoZeroDivisors R] [Nontrivial R] :
    (descPochhammer R n).natDegree = n := by
  induction' n with n hn
  · 

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

Next tactic:
simp
@[simp]
theorem descPochhammer_natDegree (n : ℕ) [NoZeroDivisors R] [Nontrivial R] :
    (descPochhammer R n).natDegree = n := by
  induction' n with n hn
  · simp
  · 

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

Next tactic:
have : natDegree (X - (n : R[X])) = 1 := natDegree_X_sub_C (n : R)
@[simp]
theorem descPochhammer_natDegree (n : ℕ) [NoZeroDivisors R] [Nontrivial R] :
    (descPochhammer R n).natDegree = n := by
  induction' n with n hn
  · simp
  · have : natDegree (X - (n : R[X])) = 1 := natDegree_X_sub_C (n : R)
    

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

Next tactic:
rw [descPochhammer_succ_right,
        natDegree_mul _ (ne_zero_of_natDegree_gt <| this.symm ▸ Nat.zero_lt_one), hn, this]
@[simp]
theorem descPochhammer_natDegree (n : ℕ) [NoZeroDivisors R] [Nontrivial R] :
    (descPochhammer R n).natDegree = n := by
  induction' n with n hn
  · simp
  · have : natDegree (X - (n : R[X])) = 1 := natDegree_X_sub_C (n : R)
    rw [descPochhammer_succ_right,
        natDegree_mul _ (ne_zero_of_natDegree_gt <| this.symm ▸ Nat.zero_lt_one), hn, this]
    

Proof state:
R : Type u
inst✝² : Ring R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
n : ℕ
hn : natDegree (descPochhammer R n) = n
this : natDegree (X - ↑n) = 1
⊢ descPochhammer R n ≠ 0

Next tactic:
cases n
@[simp]
theorem descPochhammer_natDegree (n : ℕ) [NoZeroDivisors R] [Nontrivial R] :
    (descPochhammer R n).natDegree = n := by
  induction' n with n hn
  · simp
  · have : natDegree (X - (n : R[X])) = 1 := natDegree_X_sub_C (n : R)
    rw [descPochhammer_succ_right,
        natDegree_mul _ (ne_zero_of_natDegree_gt <| this.symm ▸ Nat.zero_lt_one), hn, this]
    cases n
    · 

Proof state:
case zero
R : Type u
inst✝² : Ring R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
hn : natDegree (descPochhammer R Nat.zero) = Nat.zero
this : natDegree (X - ↑Nat.zero) = 1
⊢ descPochhammer R Nat.zero ≠ 0

Next tactic:
simp
@[simp]
theorem descPochhammer_natDegree (n : ℕ) [NoZeroDivisors R] [Nontrivial R] :
    (descPochhammer R n).natDegree = n := by
  induction' n with n hn
  · simp
  · have : natDegree (X - (n : R[X])) = 1 := natDegree_X_sub_C (n : R)
    rw [descPochhammer_succ_right,
        natDegree_mul _ (ne_zero_of_natDegree_gt <| this.symm ▸ Nat.zero_lt_one), hn, this]
    cases n
    · simp
    · 

Proof state:
case succ
R : Type u
inst✝² : Ring R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
n✝ : ℕ
hn : natDegree (descPochhammer R (Nat.succ n✝)) = Nat.succ n✝
this : natDegree (X - ↑(Nat.succ n✝)) = 1
⊢ descPochhammer R (Nat.succ n✝) ≠ 0

Next tactic:
refine' ne_zero_of_natDegree_gt <| hn.symm ▸ Nat.succ_pos _
theorem descPochhammer_succ_eval {S : Type*} [Ring S] (n : ℕ) (k : S) :
    (descPochhammer S (n + 1)).eval k = (descPochhammer S n).eval k * (k - n) := by
  

Proof state:
R : Type u
inst✝¹ : Ring R
S : Type u_1
inst✝ : Ring S
n : ℕ
k : S
⊢ eval k (descPochhammer S (n + 1)) = eval k (descPochhammer S n) * (k - ↑n)

Next tactic:
rw [descPochhammer_succ_right, mul_sub, eval_sub, eval_mul_X, ← Nat.cast_comm, ← C_eq_nat_cast,
    eval_C_mul, Nat.cast_comm, ← mul_sub]
theorem descPochhammer_succ_comp_X_sub_one (n : ℕ) :
    (descPochhammer R (n + 1)).comp (X - 1) =
      descPochhammer R (n + 1) - (n + (1 : R[X])) • (descPochhammer R n).comp (X - 1) := by
  

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

Next tactic:
suffices (descPochhammer ℤ (n + 1)).comp (X - 1) =
      descPochhammer ℤ (n + 1) - (n + 1) * (descPochhammer ℤ n).comp (X - 1)
    by simpa [map_comp] using congr_arg (Polynomial.map (Int.castRingHom R)) this
theorem descPochhammer_succ_comp_X_sub_one (n : ℕ) :
    (descPochhammer R (n + 1)).comp (X - 1) =
      descPochhammer R (n + 1) - (n + (1 : R[X])) • (descPochhammer R n).comp (X - 1) := by
  suffices (descPochhammer ℤ (n + 1)).comp (X - 1) =
      descPochhammer ℤ (n + 1) - (n + 1) * (descPochhammer ℤ n).comp (X - 1)
    by 

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

Next tactic:
simpa [map_comp] using congr_arg (Polynomial.map (Int.castRingHom R)) this
theorem descPochhammer_succ_comp_X_sub_one (n : ℕ) :
    (descPochhammer R (n + 1)).comp (X - 1) =
      descPochhammer R (n + 1) - (n + (1 : R[X])) • (descPochhammer R n).comp (X - 1) := by
  suffices (descPochhammer ℤ (n + 1)).comp (X - 1) =
      descPochhammer ℤ (n + 1) - (n + 1) * (descPochhammer ℤ n).comp (X - 1)
    by simpa [map_comp] using congr_arg (Polynomial.map (Int.castRingHom R)) this
  

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

Next tactic:
nth_rw 2 [descPochhammer_succ_left]
theorem descPochhammer_succ_comp_X_sub_one (n : ℕ) :
    (descPochhammer R (n + 1)).comp (X - 1) =
      descPochhammer R (n + 1) - (n + (1 : R[X])) • (descPochhammer R n).comp (X - 1) := by
  suffices (descPochhammer ℤ (n + 1)).comp (X - 1) =
      descPochhammer ℤ (n + 1) - (n + 1) * (descPochhammer ℤ n).comp (X - 1)
    by simpa [map_comp] using congr_arg (Polynomial.map (Int.castRingHom R)) this
  nth_rw 2 [descPochhammer_succ_left]
  

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

Next tactic:
rw [← sub_mul, descPochhammer_succ_right ℤ n, mul_comp, mul_comm, sub_comp, X_comp, nat_cast_comp]
theorem descPochhammer_succ_comp_X_sub_one (n : ℕ) :
    (descPochhammer R (n + 1)).comp (X - 1) =
      descPochhammer R (n + 1) - (n + (1 : R[X])) • (descPochhammer R n).comp (X - 1) := by
  suffices (descPochhammer ℤ (n + 1)).comp (X - 1) =
      descPochhammer ℤ (n + 1) - (n + 1) * (descPochhammer ℤ n).comp (X - 1)
    by simpa [map_comp] using congr_arg (Polynomial.map (Int.castRingHom R)) this
  nth_rw 2 [descPochhammer_succ_left]
  rw [← sub_mul, descPochhammer_succ_right ℤ n, mul_comp, mul_comm, sub_comp, X_comp, nat_cast_comp]
  

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

Next tactic:
ring
theorem descPochhammer_mul (n m : ℕ) :
    descPochhammer R n * (descPochhammer R m).comp (X - (n : R[X])) = descPochhammer R (n + m) := by
  

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

Next tactic:
induction' m with m ih
theorem descPochhammer_mul (n m : ℕ) :
    descPochhammer R n * (descPochhammer R m).comp (X - (n : R[X])) = descPochhammer R (n + m) := by
  induction' m with m ih
  · 

Proof state:
case zero
R : Type u
inst✝ : Ring R
n : ℕ
⊢ descPochhammer R n * comp (descPochhammer R Nat.zero) (X - ↑n) = descPochhammer R (n + Nat.zero)

Next tactic:
simp
theorem descPochhammer_mul (n m : ℕ) :
    descPochhammer R n * (descPochhammer R m).comp (X - (n : R[X])) = descPochhammer R (n + m) := by
  induction' m with m ih
  · simp
  · 

Proof state:
case succ
R : Type u
inst✝ : Ring R
n m : ℕ
ih : descPochhammer R n * comp (descPochhammer R m) (X - ↑n) = descPochhammer R (n + m)
⊢ descPochhammer R n * comp (descPochhammer R (Nat.succ m)) (X - ↑n) = descPochhammer R (n + Nat.succ m)

Next tactic:
rw [descPochhammer_succ_right, Polynomial.mul_X_sub_int_cast_comp, ← mul_assoc, ih,
      Nat.succ_eq_add_one, ← add_assoc, descPochhammer_succ_right, Nat.cast_add, sub_add_eq_sub_sub]
theorem descPochhammer_int_eq_descFactorial (n : ℕ) :
    ∀ k, (descPochhammer ℤ k).eval (n : ℤ) = n.descFactorial k
  | 0 => by
    

Proof state:
R : Type u
inst✝ : Ring R
n : ℕ
⊢ eval (↑n) (descPochhammer ℤ 0) = ↑(Nat.descFactorial n 0)

Next tactic:
rw [descPochhammer_zero, eval_one, Nat.descFactorial_zero]
theorem descPochhammer_int_eq_descFactorial (n : ℕ) :
    ∀ k, (descPochhammer ℤ k).eval (n : ℤ) = n.descFactorial k
  | 0 => by
    rw [descPochhammer_zero, eval_one, Nat.descFactorial_zero]
    

Proof state:
R : Type u
inst✝ : Ring R
n : ℕ
⊢ 1 = ↑1

Next tactic:
rfl
theorem descPochhammer_int_eq_descFactorial (n : ℕ) :
    ∀ k, (descPochhammer ℤ k).eval (n : ℤ) = n.descFactorial k
  | 0 => by
    rw [descPochhammer_zero, eval_one, Nat.descFactorial_zero]
    rfl
  | t + 1 => by
    

Proof state:
R : Type u
inst✝ : Ring R
n t : ℕ
⊢ eval (↑n) (descPochhammer ℤ (t + 1)) = ↑(Nat.descFactorial n (t + 1))

Next tactic:
rw [descPochhammer_succ_right, eval_mul, descPochhammer_int_eq_descFactorial n t]
theorem descPochhammer_int_eq_descFactorial (n : ℕ) :
    ∀ k, (descPochhammer ℤ k).eval (n : ℤ) = n.descFactorial k
  | 0 => by
    rw [descPochhammer_zero, eval_one, Nat.descFactorial_zero]
    rfl
  | t + 1 => by
    rw [descPochhammer_succ_right, eval_mul, descPochhammer_int_eq_descFactorial n t]
    

Proof state:
R : Type u
inst✝ : Ring R
n t : ℕ
⊢ ↑(Nat.descFactorial n t) * eval (↑n) (X - ↑t) = ↑(Nat.descFactorial n (t + 1))

Next tactic:
simp only [eval_sub, eval_X, eval_nat_cast, Nat.descFactorial_succ, Nat.cast_mul,
        Nat.descFactorial_eq_zero_iff_lt]
theorem descPochhammer_int_eq_descFactorial (n : ℕ) :
    ∀ k, (descPochhammer ℤ k).eval (n : ℤ) = n.descFactorial k
  | 0 => by
    rw [descPochhammer_zero, eval_one, Nat.descFactorial_zero]
    rfl
  | t + 1 => by
    rw [descPochhammer_succ_right, eval_mul, descPochhammer_int_eq_descFactorial n t]
    simp only [eval_sub, eval_X, eval_nat_cast, Nat.descFactorial_succ, Nat.cast_mul,
        Nat.descFactorial_eq_zero_iff_lt]
    

Proof state:
R : Type u
inst✝ : Ring R
n t : ℕ
⊢ ↑(Nat.descFactorial n t) * (↑n - ↑t) = ↑(n - t) * ↑(Nat.descFactorial n t)

Next tactic:
rw [mul_comm]
theorem descPochhammer_int_eq_descFactorial (n : ℕ) :
    ∀ k, (descPochhammer ℤ k).eval (n : ℤ) = n.descFactorial k
  | 0 => by
    rw [descPochhammer_zero, eval_one, Nat.descFactorial_zero]
    rfl
  | t + 1 => by
    rw [descPochhammer_succ_right, eval_mul, descPochhammer_int_eq_descFactorial n t]
    simp only [eval_sub, eval_X, eval_nat_cast, Nat.descFactorial_succ, Nat.cast_mul,
        Nat.descFactorial_eq_zero_iff_lt]
    rw [mul_comm]
    

Proof state:
R : Type u
inst✝ : Ring R
n t : ℕ
⊢ (↑n - ↑t) * ↑(Nat.descFactorial n t) = ↑(n - t) * ↑(Nat.descFactorial n t)

Next tactic:
simp only [mul_eq_mul_right_iff, Nat.cast_eq_zero, Nat.descFactorial_eq_zero_iff_lt]
theorem descPochhammer_int_eq_descFactorial (n : ℕ) :
    ∀ k, (descPochhammer ℤ k).eval (n : ℤ) = n.descFactorial k
  | 0 => by
    rw [descPochhammer_zero, eval_one, Nat.descFactorial_zero]
    rfl
  | t + 1 => by
    rw [descPochhammer_succ_right, eval_mul, descPochhammer_int_eq_descFactorial n t]
    simp only [eval_sub, eval_X, eval_nat_cast, Nat.descFactorial_succ, Nat.cast_mul,
        Nat.descFactorial_eq_zero_iff_lt]
    rw [mul_comm]
    simp only [mul_eq_mul_right_iff, Nat.cast_eq_zero, Nat.descFactorial_eq_zero_iff_lt]
    

Proof state:
R : Type u
inst✝ : Ring R
n t : ℕ
⊢ ↑n - ↑t = ↑(n - t) ∨ n < t

Next tactic:
by_cases h : n < t
theorem descPochhammer_int_eq_descFactorial (n : ℕ) :
    ∀ k, (descPochhammer ℤ k).eval (n : ℤ) = n.descFactorial k
  | 0 => by
    rw [descPochhammer_zero, eval_one, Nat.descFactorial_zero]
    rfl
  | t + 1 => by
    rw [descPochhammer_succ_right, eval_mul, descPochhammer_int_eq_descFactorial n t]
    simp only [eval_sub, eval_X, eval_nat_cast, Nat.descFactorial_succ, Nat.cast_mul,
        Nat.descFactorial_eq_zero_iff_lt]
    rw [mul_comm]
    simp only [mul_eq_mul_right_iff, Nat.cast_eq_zero, Nat.descFactorial_eq_zero_iff_lt]
    by_cases h : n < t
    · 

Proof state:
case pos
R : Type u
inst✝ : Ring R
n t : ℕ
h : n < t
⊢ ↑n - ↑t = ↑(n - t) ∨ n < t

Next tactic:
tauto
theorem descPochhammer_int_eq_descFactorial (n : ℕ) :
    ∀ k, (descPochhammer ℤ k).eval (n : ℤ) = n.descFactorial k
  | 0 => by
    rw [descPochhammer_zero, eval_one, Nat.descFactorial_zero]
    rfl
  | t + 1 => by
    rw [descPochhammer_succ_right, eval_mul, descPochhammer_int_eq_descFactorial n t]
    simp only [eval_sub, eval_X, eval_nat_cast, Nat.descFactorial_succ, Nat.cast_mul,
        Nat.descFactorial_eq_zero_iff_lt]
    rw [mul_comm]
    simp only [mul_eq_mul_right_iff, Nat.cast_eq_zero, Nat.descFactorial_eq_zero_iff_lt]
    by_cases h : n < t
    · tauto
    · 

Proof state:
case neg
R : Type u
inst✝ : Ring R
n t : ℕ
h : ¬n < t
⊢ ↑n - ↑t = ↑(n - t) ∨ n < t

Next tactic:
left
theorem descPochhammer_int_eq_descFactorial (n : ℕ) :
    ∀ k, (descPochhammer ℤ k).eval (n : ℤ) = n.descFactorial k
  | 0 => by
    rw [descPochhammer_zero, eval_one, Nat.descFactorial_zero]
    rfl
  | t + 1 => by
    rw [descPochhammer_succ_right, eval_mul, descPochhammer_int_eq_descFactorial n t]
    simp only [eval_sub, eval_X, eval_nat_cast, Nat.descFactorial_succ, Nat.cast_mul,
        Nat.descFactorial_eq_zero_iff_lt]
    rw [mul_comm]
    simp only [mul_eq_mul_right_iff, Nat.cast_eq_zero, Nat.descFactorial_eq_zero_iff_lt]
    by_cases h : n < t
    · tauto
    · left
      

Proof state:
case neg.h
R : Type u
inst✝ : Ring R
n t : ℕ
h : ¬n < t
⊢ ↑n - ↑t = ↑(n - t)

Next tactic:
exact (Int.ofNat_sub <| not_lt.mp h).symm
theorem descPochhammer_int_eq_ascFactorial (a b : ℕ) :
    (descPochhammer ℤ b).eval (a + b : ℤ) = a.ascFactorial b := by
  

Proof state:
R : Type u
inst✝ : Ring R
a b : ℕ
⊢ eval (↑a + ↑b) (descPochhammer ℤ b) = ↑(Nat.ascFactorial a b)

Next tactic:
rw [← Nat.cast_add, descPochhammer_int_eq_descFactorial (a + b) b,
      Nat.add_descFactorial_eq_ascFactorial]