Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


Quelle  Polynomial.lean   Sprache: Lean

 

/-
Copyright (c) 2019 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel, Eric Wieser
-/

module

public import Mathlib.Algebra.Polynomial.AlgebraMap
public import Mathlib.Algebra.Polynomial.Derivative
public import Mathlib.Analysis.Calculus.Deriv.Pow

import Mathlib.Analysis.Calculus.Deriv.Add
import Mathlib.Analysis.Calculus.Deriv.Mul

/-!
# Derivatives of polynomials

In this file we prove that derivatives of polynomials in the analysis sense agree with their
derivatives in the algebraic sense.

For a more detailed overview of one-dimensional derivatives in mathlib, see the module docstring of
`Mathlib/Analysis/Calculus/Deriv/Basic.lean`.

## TODO

* Add results about multivariable polynomials.
* Generalize some (most?) results to an algebra over the base field.

## Keywords

derivative, polynomial
-/


public section


universe u

open scoped Polynomial

open ContinuousLinearMap (smulRight)

variable {�� : Type u} [NontriviallyNormedField ��] {x : ��} {s : Set ��}

namespace Polynomial

/-! ### Derivative of a polynomial -/


variable {R : Type*} [CommSemiring R] [Algebra R ��]
variable (p : ��[X]) (q : R[X])

/-- The derivative (in the analysis sense) of a polynomial `p` is given by `p.derivative`. -/
protected theorem hasStrictDerivAt (x : ��) :
    HasStrictDerivAt (fun x => p.eval x) (p.derivative.eval x) x := by
  induction p using Polynomial.induction_on' with
  | add p q hp hq => simpa using! hp.add hq
  | monomial n a => simpa [mul_assoc, derivative_monomial]
                      using! (hasStrictDerivAt_pow n x).const_mul a

protected theorem hasStrictDerivAt_aeval (x : ��) :
    HasStrictDerivAt (fun x => aeval x q) (aeval x (derivative q)) x := by
  simpa only [aeval_def, eval₂_eq_eval_map, derivative_map] using
    (q.map (algebraMap R ��)).hasStrictDerivAt x

/-- The derivative (in the analysis sense) of a polynomial `p` is given by `p.derivative`. -/
protected theorem hasDerivAt (x : ��) : HasDerivAt (fun x => p.eval x) (p.derivative.eval x) x :=
  (p.hasStrictDerivAt x).hasDerivAt

protected theorem hasDerivAt_aeval (x : ��) :
    HasDerivAt (fun x => aeval x q) (aeval x (derivative q)) x :=
  (q.hasStrictDerivAt_aeval x).hasDerivAt

protected theorem hasDerivWithinAt (x : ��) (s : Set ��) :
    HasDerivWithinAt (fun x => p.eval x) (p.derivative.eval x) s x :=
  (p.hasDerivAt x).hasDerivWithinAt

protected theorem hasDerivWithinAt_aeval (x : ��) (s : Set ��) :
    HasDerivWithinAt (fun x => aeval x q) (aeval x (derivative q)) s x :=
  (q.hasDerivAt_aeval x).hasDerivWithinAt

protected theorem differentiableAt : DifferentiableAt �� (fun x => p.eval x) x :=
  (p.hasDerivAt x).differentiableAt

protected theorem differentiableAt_aeval : DifferentiableAt �� (fun x => aeval x q) x :=
  (q.hasDerivAt_aeval x).differentiableAt

protected theorem differentiableWithinAt : DifferentiableWithinAt �� (fun x => p.eval x) s x :=
  p.differentiableAt.differentiableWithinAt

protected theorem differentiableWithinAt_aeval :
    DifferentiableWithinAt �� (fun x => aeval x q) s x :=
  q.differentiableAt_aeval.differentiableWithinAt

@[fun_prop]
protected theorem differentiable : Differentiable �� fun x => p.eval x := fun _ => p.differentiableAt

protected theorem differentiable_aeval : Differentiable �� fun x : �� => aeval x q := fun _ =>
  q.differentiableAt_aeval

protected theorem differentiableOn : DifferentiableOn �� (fun x => p.eval x) s :=
  p.differentiable.differentiableOn

protected theorem differentiableOn_aeval : DifferentiableOn �� (fun x => aeval x q) s :=
  q.differentiable_aeval.differentiableOn

@[simp]
protected theorem deriv : deriv (fun x => p.eval x) x = p.derivative.eval x :=
  (p.hasDerivAt x).deriv

@[simp]
protected theorem deriv_aeval : deriv (fun x => aeval x q) x = aeval x (derivative q) :=
  (q.hasDerivAt_aeval x).deriv

protected theorem derivWithin (hxs : UniqueDiffWithinAt �� s x) :
    derivWithin (fun x => p.eval x) s x = p.derivative.eval x := by
  rw [DifferentiableAt.derivWithin p.differentiableAt hxs]
  exact p.deriv

protected theorem derivWithin_aeval (hxs : UniqueDiffWithinAt �� s x) :
    derivWithin (fun x => aeval x q) s x = aeval x (derivative q) := by
  simpa only [aeval_def, eval₂_eq_eval_map, derivative_map] using
    (q.map (algebraMap R ��)).derivWithin hxs

protected theorem hasFDerivAt (x : ��) :
    HasFDerivAt (fun x => p.eval x) (smulRight (1 : �� →L[��] ��) (p.derivative.eval x)) x :=
  p.hasDerivAt x

protected theorem hasFDerivAt_aeval (x : ��) :
    HasFDerivAt (fun x => aeval x q) (smulRight (1 : �� →L[��] ��) (aeval x (derivative q))) x :=
  q.hasDerivAt_aeval x

protected theorem hasFDerivWithinAt (x : ��) :
    HasFDerivWithinAt (fun x => p.eval x) (smulRight (1 : �� →L[��] ��) (p.derivative.eval x)) s x :=
  (p.hasFDerivAt x).hasFDerivWithinAt

protected theorem hasFDerivWithinAt_aeval (x : ��) :
    HasFDerivWithinAt (fun x => aeval x q) (smulRight (1 : �� →L[��] ��)
      (aeval x (derivative q))) s x :=
  (q.hasFDerivAt_aeval x).hasFDerivWithinAt

@[simp]
protected theorem fderiv :
    fderiv �� (fun x => p.eval x) x = smulRight (1 : �� →L[��] ��) (p.derivative.eval x) :=
  (p.hasFDerivAt x).fderiv

@[simp]
protected theorem fderiv_aeval :
    fderiv �� (fun x => aeval x q) x = smulRight (1 : �� →L[��] ��) (aeval x (derivative q)) :=
  (q.hasFDerivAt_aeval x).fderiv

protected theorem fderivWithin (hxs : UniqueDiffWithinAt �� s x) :
    fderivWithin �� (fun x => p.eval x) s x = smulRight (1 : �� →L[��] ��) (p.derivative.eval x) :=
  (p.hasFDerivWithinAt x).fderivWithin hxs

protected theorem fderivWithin_aeval (hxs : UniqueDiffWithinAt �� s x) :
    fderivWithin �� (fun x => aeval x q) s x = smulRight (1 : �� →L[��] ��) (aeval x (derivative q)) :=
  (q.hasFDerivWithinAt_aeval x).fderivWithin hxs

end Polynomial

Messung
CHZG
9210010097

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,158
#Domains=932,844