File: Mathlib/Algebra/Polynomial/Taylor.lean

full_name: Polynomial.taylor
code: /-- The Taylor expansion of a polynomial `f` at `r`. -/
def taylor (r : R) : R[X] →ₗ[R] R[X] 
goal: Polynomial R →ₗ[R] Polynomial R

full_name: Polynomial.taylor_apply
code: theorem taylor_apply : taylor r f = f.comp (X + C r) 
goal: (Polynomial.taylor r) f = f.comp (Polynomial.X + Polynomial.C r)

full_name: Polynomial.taylor_X
code: @[simp]
theorem taylor_X : taylor r X = X + C r 
goal: (Polynomial.taylor r) Polynomial.X = Polynomial.X + Polynomial.C r

full_name: Polynomial.taylor_C
code: @[simp]
theorem taylor_C (x : R) : taylor r (C x) = C x 
goal: (Polynomial.taylor r) (Polynomial.C x) = Polynomial.C x

full_name: Polynomial.taylor_zero'
code: @[simp]
theorem taylor_zero' : taylor (0 : R) = LinearMap.id 
goal: Polynomial.taylor 0 = LinearMap.id

full_name: Polynomial.taylor_zero
code: theorem taylor_zero (f : R[X]) : taylor 0 f = f 
goal: (Polynomial.taylor 0) f = f

full_name: Polynomial.taylor_one
code: @[simp]
theorem taylor_one : taylor r (1 : R[X]) = C 1 
goal: (Polynomial.taylor r) 1 = Polynomial.C 1

full_name: Polynomial.taylor_monomial
code: @[simp]
theorem taylor_monomial (i : ℕ) (k : R) : taylor r (monomial i k) = C k * (X + C r) ^ i 
goal: (Polynomial.taylor r) ((Polynomial.monomial i) k) = Polynomial.C k * (Polynomial.X + Polynomial.C r) ^ i

full_name: Polynomial.taylor_coeff
code: /-- The `k`th coefficient of `Polynomial.taylor r f` is `(Polynomial.hasseDeriv k f).eval r`. -/
theorem taylor_coeff (n : ℕ) : (taylor r f).coeff n = (hasseDeriv n f).eval r 
goal: ((Polynomial.taylor r) f).coeff n = Polynomial.eval r ((Polynomial.hasseDeriv n) f)

full_name: Polynomial.taylor_coeff_zero
code: @[simp]
theorem taylor_coeff_zero : (taylor r f).coeff 0 = f.eval r 
goal: ((Polynomial.taylor r) f).coeff 0 = Polynomial.eval r f

full_name: Polynomial.taylor_coeff_one
code: @[simp]
theorem taylor_coeff_one : (taylor r f).coeff 1 = f.derivative.eval r 
goal: ((Polynomial.taylor r) f).coeff 1 = Polynomial.eval r (Polynomial.derivative f)

full_name: Polynomial.natDegree_taylor
code: @[simp]
theorem natDegree_taylor (p : R[X]) (r : R) : natDegree (taylor r p) = natDegree p 
goal: ((Polynomial.taylor r) p).natDegree = p.natDegree

full_name: Polynomial.taylor_mul
code: @[simp]
theorem taylor_mul {R} [CommSemiring R] (r : R) (p q : R[X]) :
    taylor r (p * q) = taylor r p * taylor r q 
goal: (Polynomial.taylor r) (p * q) = (Polynomial.taylor r) p * (Polynomial.taylor r) q

full_name: Polynomial.taylorAlgHom
code: /-- `Polynomial.taylor` as an `AlgHom` for commutative semirings -/
@[simps!]
def taylorAlgHom {R} [CommSemiring R] (r : R) : R[X] →ₐ[R] R[X] 
goal: Polynomial R →ₐ[R] Polynomial R

full_name: Polynomial.taylorAlgHom_apply
code: /-- `Polynomial.taylor` as an `AlgHom` for commutative semirings -/
@[simps!]
def taylorAlgHom {R} [CommSemiring R] (r : R) : R[X] →ₐ[R] R[X] 
goal: (Polynomial.taylorAlgHom r) a = (Polynomial.taylor r) a

full_name: Polynomial.taylor_taylor
code: theorem taylor_taylor {R} [CommSemiring R] (f : R[X]) (r s : R) :
    taylor r (taylor s f) = taylor (r + s) f 
goal: (Polynomial.taylor r) ((Polynomial.taylor s) f) = (Polynomial.taylor (r + s)) f

full_name: Polynomial.taylor_eval
code: theorem taylor_eval {R} [CommSemiring R] (r : R) (f : R[X]) (s : R) :
    (taylor r f).eval s = f.eval (s + r) 
goal: Polynomial.eval s ((Polynomial.taylor r) f) = Polynomial.eval (s + r) f

full_name: Polynomial.taylor_eval_sub
code: theorem taylor_eval_sub {R} [CommRing R] (r : R) (f : R[X]) (s : R) :
    (taylor r f).eval (s - r) = f.eval s 
goal: Polynomial.eval (s - r) ((Polynomial.taylor r) f) = Polynomial.eval s f

full_name: Polynomial.taylor_injective
code: theorem taylor_injective {R} [CommRing R] (r : R) : Function.Injective (taylor r) 
goal: Function.Injective ⇑(Polynomial.taylor r)

full_name: Polynomial.eq_zero_of_hasseDeriv_eq_zero
code: theorem eq_zero_of_hasseDeriv_eq_zero {R} [CommRing R] (f : R[X]) (r : R)
    (h : ∀ k, (hasseDeriv k f).eval r = 0) : f = 0 
goal: f = 0

full_name: Polynomial.sum_taylor_eq
code: /-- Taylor's formula. -/
theorem sum_taylor_eq {R} [CommRing R] (f : R[X]) (r : R) :
    ((taylor r f).sum fun i a => C a * (X - C r) ^ i) = f 
goal: (((Polynomial.taylor r) f).sum fun i a => Polynomial.C a * (Polynomial.X - Polynomial.C r) ^ i) = f