File: Mathlib/RingTheory/Polynomial/Pochhammer.lean

full_name: ascPochhammer
code: /-- `ascPochhammer S n` is the polynomial `X * (X + 1) * ... * (X + n - 1)`,
with coefficients in the semiring `S`.
-/
noncomputable def ascPochhammer : ℕ → S[X]
  
goal: ℕ → S[X]

full_name: ascPochhammer_zero
code: @[simp]
theorem ascPochhammer_zero : ascPochhammer S 0 = 1 
goal: ascPochhammer S 0 = 1

full_name: ascPochhammer_one
code: @[simp]
theorem ascPochhammer_one : ascPochhammer S 1 = X 
goal: ascPochhammer S 1 = Polynomial.X

full_name: ascPochhammer_succ_left
code: theorem ascPochhammer_succ_left (n : ℕ) :
    ascPochhammer S (n + 1) = X * (ascPochhammer S n).comp (X + 1) 
goal: ascPochhammer S (n + 1) = Polynomial.X * (ascPochhammer S n).comp (Polynomial.X + 1)

full_name: monic_ascPochhammer
code: theorem monic_ascPochhammer (n : ℕ) [Nontrivial S] [NoZeroDivisors S] :
    Monic <| ascPochhammer S n 
goal: (ascPochhammer S n).Monic

full_name: ascPochhammer_map
code: @[simp]
theorem ascPochhammer_map (f : S →+* T) (n : ℕ) :
    (ascPochhammer S n).map f = ascPochhammer T n 
goal: Polynomial.map f (ascPochhammer S n) = ascPochhammer T n

full_name: ascPochhammer_eval₂
code: theorem ascPochhammer_eval₂ (f : S →+* T) (n : ℕ) (t : T) :
    (ascPochhammer T n).eval t = (ascPochhammer S n).eval₂ f t 
goal: Polynomial.eval t (ascPochhammer T n) = Polynomial.eval₂ f t (ascPochhammer S n)

full_name: ascPochhammer_eval_comp
code: theorem ascPochhammer_eval_comp {R : Type*} [CommSemiring R] (n : ℕ) (p : R[X]) [Algebra R S]
    (x : S) : ((ascPochhammer S n).comp (p.map (algebraMap R S))).eval x =
    (ascPochhammer S n).eval (p.eval₂ (algebraMap R S) x) 
goal: Polynomial.eval x ((ascPochhammer S n).comp (Polynomial.map (algebraMap R S) p)) =
  Polynomial.eval (Polynomial.eval₂ (algebraMap R S) x p) (ascPochhammer S n)

full_name: ascPochhammer_eval_cast
code: @[simp, norm_cast]
theorem ascPochhammer_eval_cast (n k : ℕ) :
    (((ascPochhammer ℕ n).eval k : ℕ) : S) = ((ascPochhammer S n).eval k : S) 
goal: ↑(Polynomial.eval k (ascPochhammer ℕ n)) = Polynomial.eval (↑k) (ascPochhammer S n)

full_name: ascPochhammer_eval_zero
code: theorem ascPochhammer_eval_zero {n : ℕ} : (ascPochhammer S n).eval 0 = if n = 0 then 1 else 0 
goal: Polynomial.eval 0 (ascPochhammer S n) = if n = 0 then 1 else 0

full_name: ascPochhammer_zero_eval_zero
code: theorem ascPochhammer_zero_eval_zero : (ascPochhammer S 0).eval 0 = 1 
goal: Polynomial.eval 0 (ascPochhammer S 0) = 1

full_name: ascPochhammer_ne_zero_eval_zero
code: @[simp]
theorem ascPochhammer_ne_zero_eval_zero {n : ℕ} (h : n ≠ 0) : (ascPochhammer S n).eval 0 = 0 
goal: Polynomial.eval 0 (ascPochhammer S n) = 0

full_name: ascPochhammer_succ_right
code: theorem ascPochhammer_succ_right (n : ℕ) :
    ascPochhammer S (n + 1) = ascPochhammer S n * (X + (n : S[X])) 
goal: ascPochhammer S (n + 1) = ascPochhammer S n * (Polynomial.X + ↑n)

full_name: ascPochhammer_succ_eval
code: theorem ascPochhammer_succ_eval {S : Type*} [Semiring S] (n : ℕ) (k : S) :
    (ascPochhammer S (n + 1)).eval k = (ascPochhammer S n).eval k * (k + n) 
goal: Polynomial.eval k (ascPochhammer S (n + 1)) = Polynomial.eval k (ascPochhammer S n) * (k + ↑n)

full_name: ascPochhammer_succ_comp_X_add_one
code: 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) 
goal: (ascPochhammer S (n + 1)).comp (Polynomial.X + 1) =
  ascPochhammer S (n + 1) + (n + 1) • (ascPochhammer S n).comp (Polynomial.X + 1)

full_name: ascPochhammer_mul
code: theorem ascPochhammer_mul (n m : ℕ) :
    ascPochhammer S n * (ascPochhammer S m).comp (X + (n : S[X])) = ascPochhammer S (n + m) 
goal: ascPochhammer S n * (ascPochhammer S m).comp (Polynomial.X + ↑n) = ascPochhammer S (n + m)

full_name: ascPochhammer_nat_eq_ascFactorial
code: theorem ascPochhammer_nat_eq_ascFactorial (n : ℕ) :
    ∀ k, (ascPochhammer ℕ k).eval n = n.ascFactorial k
  
goal: Polynomial.eval n (ascPochhammer ℕ k) = n.ascFactorial k

full_name: ascPochhammer_nat_eq_descFactorial
code: theorem ascPochhammer_nat_eq_descFactorial (a b : ℕ) :
    (ascPochhammer ℕ b).eval a = (a + b - 1).descFactorial b 
goal: Polynomial.eval a (ascPochhammer ℕ b) = (a + b - 1).descFactorial b

full_name: ascPochhammer_natDegree
code: @[simp]
theorem ascPochhammer_natDegree (n : ℕ) [NoZeroDivisors S] [Nontrivial S] :
    (ascPochhammer S n).natDegree = n 
goal: (ascPochhammer S n).natDegree = n

full_name: ascPochhammer_pos
code: theorem ascPochhammer_pos (n : ℕ) (s : S) (h : 0 < s) : 0 < (ascPochhammer S n).eval s 
goal: 0 < Polynomial.eval s (ascPochhammer S n)

full_name: ascPochhammer_eval_one
code: @[simp]
theorem ascPochhammer_eval_one (S : Type*) [Semiring S] (n : ℕ) :
    (ascPochhammer S n).eval (1 : S) = (n ! : S) 
goal: Polynomial.eval 1 (ascPochhammer S n) = ↑n.factorial

full_name: factorial_mul_ascPochhammer
code: theorem factorial_mul_ascPochhammer (S : Type*) [Semiring S] (r n : ℕ) :
    (r ! : S) * (ascPochhammer S n).eval (r + 1 : S) = (r + n)! 
goal: ↑r.factorial * Polynomial.eval (↑r + 1) (ascPochhammer S n) = ↑(r + n).factorial

full_name: ascPochhammer_nat_eval_succ
code: theorem ascPochhammer_nat_eval_succ (r : ℕ) :
    ∀ n : ℕ, n * (ascPochhammer ℕ r).eval (n + 1) = (n + r) * (ascPochhammer ℕ r).eval n
  
goal: n * Polynomial.eval (n + 1) (ascPochhammer ℕ r) = (n + r) * Polynomial.eval n (ascPochhammer ℕ r)

full_name: ascPochhammer_eval_succ
code: theorem ascPochhammer_eval_succ (r n : ℕ) :
    (n : S) * (ascPochhammer S r).eval (n + 1 : S) =
    (n + r) * (ascPochhammer S r).eval (n : S) 
goal: ↑n * Polynomial.eval (↑n + 1) (ascPochhammer S r) = (↑n + ↑r) * Polynomial.eval (↑n) (ascPochhammer S r)

full_name: descPochhammer
code: /-- `descPochhammer R n` is the polynomial `X * (X - 1) * ... * (X - n + 1)`,
with coefficients in the ring `R`.
-/
noncomputable def descPochhammer : ℕ → R[X]
  
goal: ℕ → R[X]

full_name: descPochhammer_zero
code: @[simp]
theorem descPochhammer_zero : descPochhammer R 0 = 1 
goal: descPochhammer R 0 = 1

full_name: descPochhammer_one
code: @[simp]
theorem descPochhammer_one : descPochhammer R 1 = X 
goal: descPochhammer R 1 = Polynomial.X

full_name: descPochhammer_succ_left
code: theorem descPochhammer_succ_left (n : ℕ) :
    descPochhammer R (n + 1) = X * (descPochhammer R n).comp (X - 1) 
goal: descPochhammer R (n + 1) = Polynomial.X * (descPochhammer R n).comp (Polynomial.X - 1)

full_name: monic_descPochhammer
code: theorem monic_descPochhammer (n : ℕ) [Nontrivial R] [NoZeroDivisors R] :
    Monic <| descPochhammer R n 
goal: (descPochhammer R n).Monic

full_name: descPochhammer_map
code: @[simp]
theorem descPochhammer_map (f : R →+* T) (n : ℕ) :
    (descPochhammer R n).map f = descPochhammer T n 
goal: Polynomial.map f (descPochhammer R n) = descPochhammer T n

full_name: descPochhammer_eval_cast
code: @[simp, norm_cast]
theorem descPochhammer_eval_cast (n : ℕ) (k : ℤ) :
    (((descPochhammer ℤ n).eval k : ℤ) : R) = ((descPochhammer R n).eval k : R) 
goal: ↑(Polynomial.eval k (descPochhammer ℤ n)) = Polynomial.eval (↑k) (descPochhammer R n)

full_name: descPochhammer_eval_zero
code: theorem descPochhammer_eval_zero {n : ℕ} :
    (descPochhammer R n).eval 0 = if n = 0 then 1 else 0 
goal: Polynomial.eval 0 (descPochhammer R n) = if n = 0 then 1 else 0

full_name: descPochhammer_zero_eval_zero
code: theorem descPochhammer_zero_eval_zero : (descPochhammer R 0).eval 0 = 1 
goal: Polynomial.eval 0 (descPochhammer R 0) = 1

full_name: descPochhammer_ne_zero_eval_zero
code: @[simp]
theorem descPochhammer_ne_zero_eval_zero {n : ℕ} (h : n ≠ 0) : (descPochhammer R n).eval 0 = 0 
goal: Polynomial.eval 0 (descPochhammer R n) = 0

full_name: descPochhammer_succ_right
code: theorem descPochhammer_succ_right (n : ℕ) :
    descPochhammer R (n + 1) = descPochhammer R n * (X - (n : R[X])) 
goal: descPochhammer R (n + 1) = descPochhammer R n * (Polynomial.X - ↑n)

full_name: descPochhammer_natDegree
code: @[simp]
theorem descPochhammer_natDegree (n : ℕ) [NoZeroDivisors R] [Nontrivial R] :
    (descPochhammer R n).natDegree = n 
goal: (descPochhammer R n).natDegree = n

full_name: descPochhammer_succ_eval
code: theorem descPochhammer_succ_eval {S : Type*} [Ring S] (n : ℕ) (k : S) :
    (descPochhammer S (n + 1)).eval k = (descPochhammer S n).eval k * (k - n) 
goal: Polynomial.eval k (descPochhammer S (n + 1)) = Polynomial.eval k (descPochhammer S n) * (k - ↑n)

full_name: descPochhammer_succ_comp_X_sub_one
code: 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) 
goal: (descPochhammer R (n + 1)).comp (Polynomial.X - 1) =
  descPochhammer R (n + 1) - (↑n + 1) • (descPochhammer R n).comp (Polynomial.X - 1)

full_name: descPochhammer_eq_ascPochhammer
code: theorem descPochhammer_eq_ascPochhammer (n : ℕ) :
    descPochhammer ℤ n = (ascPochhammer ℤ n).comp ((X : ℤ[X]) - n + 1) 
goal: descPochhammer ℤ n = (ascPochhammer ℤ n).comp (Polynomial.X - ↑n + 1)

full_name: descPochhammer_eval_eq_ascPochhammer
code: theorem descPochhammer_eval_eq_ascPochhammer (r : R) (n : ℕ) :
    (descPochhammer R n).eval r = (ascPochhammer R n).eval (r - n + 1) 
goal: Polynomial.eval r (descPochhammer R n) = Polynomial.eval (r - ↑n + 1) (ascPochhammer R n)

full_name: descPochhammer_mul
code: theorem descPochhammer_mul (n m : ℕ) :
    descPochhammer R n * (descPochhammer R m).comp (X - (n : R[X])) = descPochhammer R (n + m) 
goal: descPochhammer R n * (descPochhammer R m).comp (Polynomial.X - ↑n) = descPochhammer R (n + m)

full_name: ascPochhammer_eval_neg_eq_descPochhammer
code: theorem ascPochhammer_eval_neg_eq_descPochhammer (r : R) : ∀ (k : ℕ),
    (ascPochhammer R k).eval (-r) = (-1)^k * (descPochhammer R k).eval r
  
goal: Polynomial.eval (-r) (ascPochhammer R k) = (-1) ^ k * Polynomial.eval r (descPochhammer R k)

full_name: descPochhammer_eval_eq_descFactorial
code: theorem descPochhammer_eval_eq_descFactorial (n k : ℕ) :
    (descPochhammer R k).eval (n : R) = n.descFactorial k 
goal: Polynomial.eval (↑n) (descPochhammer R k) = ↑(n.descFactorial k)

full_name: descPochhammer_int_eq_ascFactorial
code: theorem descPochhammer_int_eq_ascFactorial (a b : ℕ) :
    (descPochhammer ℤ b).eval (a + b : ℤ) = (a + 1).ascFactorial b 
goal: Polynomial.eval (↑a + ↑b) (descPochhammer ℤ b) = ↑((a + 1).ascFactorial b)