/-
Copyright (c) 2025 A Tucker. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: A Tucker
-/
module
public import Mathlib.Analysis.Calculus.MeanValue
set_option doc.verso true
set_option doc.verso.suggestions false
/-!
# Partial derivatives
Results in this file relate the partial derivatives of a bivariate function to its differentiability
in the product space.
## Main statements
* `hasStrictFDerivAt_uncurry_coprod`: establishing strict differentiability at a point `u` in the
product space, this requires that both partial derivatives exist in a neighbourhood of `u` and be
continuous at `u`.
-/
open Asymptotics Filter
open scoped Convex Topology
/-- Suppose that along `l : Filter α` each of `v w : α → E` tends to `u : E` and that along
`l ×ˢ [s] u` the derivative of `f : α → E → F` tends to `φ : E →L[] F`. Then the difference
between `f χ (v χ)` and `f χ (w χ)` is, to first order, `φ (v χ - w χ)`. This can be useful where
`χ : α` stands for a point (or a pair of points) in a space containing `E`, and `v χ` or `w χ` is
its projection (or both are projections). -/
theorem isLittleO_sub_sub_fderiv
{α E F : Type*} [NontriviallyNormedField ] [IsRCLikeNormedField ] [NormedAddCommGroup E]
[NormedSpace ℝ E] [NormedSpace E] [NormedAddCommGroup F] [NormedSpace F]
{u : E} {v w : α → E} {l : Filter α} (hv : Tendsto v l ( u)) (hw : Tendsto w l ( u))
(s : Set E := Set.univ) (seg : ∀ᶠ χ in l, [w χ -[ℝ] v χ] ⊆ s := by simp)
{f : α → E → F} {f' : α → E → E →L[] F}
(df' : ∀ᶠ p in l ×ˢ [s] u, HasFDerivWithinAt (f p.1) (f' p.1 p.2) s p.2)
{φ : E →L[] F} (cf' : Tendsto ↿f' (l ×ˢ [s] u) ( φ)) :
(fun χ => f χ (v χ) - f χ (w χ) - φ (v χ - w χ)) =o[l] (fun χ => v χ - w χ) := by
rw [isLittleO_iff]
intro ε hε
replace df' : ∀ᶠ χ in l, ∀ z ∈ [w χ -[ℝ] v χ], HasFDerivWithinAt (f χ) (f' χ z) s z :=
df'.segment_of_prod_nhdsWithin hw hv seg
replace cf' : ∀ᶠ χ in l, ∀ z ∈ [w χ -[ℝ] v χ], ‖f' χ z - φ‖ < ε := by
simp_rw [Metric.tendsto_nhds, dist_eq_norm_sub] at cf'
exact (cf' ε hε).segment_of_prod_nhdsWithin hw hv seg
filter_upwards [seg, df', cf'] with χ seg df' cf'
exact Convex.norm_image_sub_le_of_norm_hasFDerivWithin_le'
(fun z hz => (df' z hz).mono seg) (fun z hz => (cf' z hz).le)
(convex_segment ..) (left_mem_segment ..) (right_mem_segment ..)
variable { E₁ E₂ F : Type*} [NontriviallyNormedField ] [NormedAddCommGroup E₁] [NormedSpace E₁]
[NormedAddCommGroup E₂] [NormedSpace E₂] [NormedAddCommGroup F] [NormedSpace F]
set_option backward.defeqAttrib.useBackward true in
/-- If bivariate `f : E₁ → E₂ → F` has partial derivatives `f₁` and `f₂` in a neighbourhood of
`u : E₁ × E₂` and if they are continuous there then the uncurried function `↿f` is strictly
differentiable at `u` with its derivative mapping `z` to `f₁ u.1 u.2 z.1 + f₂ u.1 u.2 z.2`. -/
public theorem hasStrictFDerivAt_uncurry_coprod
[IsRCLikeNormedField ] {u : E₁ × E₂} {f : E₁ → E₂ → F} {f₁ : E₁ → E₂ → E₁ →L[] F}
{f₂ : E₁ → E₂ → E₂ →L[] F} (df₁ : ∀ᶠ v in u, HasFDerivAt (f · v.2) (↿f₁ v) v.1)
(df₂ : ∀ᶠ v in u, HasFDerivAt (f v.1 ·) (↿f₂ v) v.2) (cf₁ : ContinuousAt ↿f₁ u)
(cf₂ : ContinuousAt ↿f₂ u) : HasStrictFDerivAt ↿f ((↿f₁ u).coprod (↿f₂ u)) u := by
rw [hasStrictFDerivAt_iff_isLittleO]
unfold ContinuousAt at cf₁ cf₂
rw [nhds_prod_eq] at df₁ df₂ cf₁ cf₂
calc
fun (v, w) => f v.1 v.2 - f w.1 w.2 - ((↿f₁ u).coprod (↿f₂ u)) (v - w)
_ = fun (v, w) => (f v.1 w.2 - f w.1 w.2 - ↿f₁ u (v.1 - w.1))
+ (f v.1 v.2 - f v.1 w.2 - ↿f₂ u (v.2 - w.2)) := by
ext
dsimp only [ContinuousLinearMap.coprod_apply]
abel
_ =o[ (u, u)] fun (v, w) => v - w := by
let : RCLike := IsRCLikeNormedField.rclike
rw [nhds_prod_eq, nhds_prod_eq]
apply IsLittleO.add
· calc
fun (v, w) => f v.1 w.2 - f w.1 w.2 - ↿f₁ u (v.1 - w.1)
_ =o[( u.1 ×ˢ u.2) ×ˢ ( u.1 ×ˢ u.2)] (fun (v, w) => v.1 - w.1 : _ → E₁) := by
have h := tendsto_snd.prodMk <| tendsto_snd.comp <| tendsto_snd.comp <|
tendsto_fst (f := ( u.1 ×ˢ u.2) ×ˢ ( u.1 ×ˢ u.2)) (g := u.1)
let : NormedSpace ℝ E₁ := RestrictScalars.normedSpace ℝ E₁
apply isLittleO_sub_sub_fderiv (α := (E₁ × E₂) × (E₁ × E₂))
(f := fun (v, w) x => f x w.2) (f' := fun (v, w) x => f₁ x w.2)
(tendsto_fst.comp tendsto_fst) (tendsto_fst.comp tendsto_snd)
· simpa using! h.eventually df₁
· simpa using! cf₁.comp h
_ =O[( u.1 ×ˢ u.2) ×ˢ ( u.1 ×ˢ u.2)] (fun (v, w) => v - w : _ → E₁ × E₂) := by
simp [isBigO_of_le]
· calc
fun (v, w) => f v.1 v.2 - f v.1 w.2 - ↿f₂ u (v.2 - w.2)
_ =o[( u.1 ×ˢ u.2) ×ˢ ( u.1 ×ˢ u.2)] (fun (v, w) => v.2 - w.2 : _ → E₂) := by
have h := (tendsto_fst.comp <| tendsto_fst.comp tendsto_fst).prodMk <|
tendsto_snd (f := ( u.1 ×ˢ u.2) ×ˢ ( u.1 ×ˢ u.2)) (g := u.2)
let : NormedSpace ℝ E₂ := RestrictScalars.normedSpace ℝ E₂
apply isLittleO_sub_sub_fderiv (f' := fun (v, w) y => f₂ v.1 y)
(tendsto_snd.comp tendsto_fst) (tendsto_snd.comp tendsto_snd)
· simpa using! h.eventually df₂
· simpa using! cf₂.comp h
_ =O[( u.1 ×ˢ u.2) ×ˢ ( u.1 ×ˢ u.2)] (fun (v, w) => v - w : _ → E₁ × E₂) := by
simp [isBigO_of_le]
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet am 2026-11-24)
¤
*© Formatika GbR, Deutschland