Documentation

TauCeti.Analysis.Sobolev.WeakDeriv.Basic

Weak derivatives on an open set #

Lane A of the PDE roadmap builds the Sobolev spaces W^{k,p}(Ω) of a domain out of weak derivatives, rather than out of Mathlib's whole-space Bessel-potential scale. This file supplies the underlying differentiation notion: for an open set Ω in a real normed space E, a measure μ on E, functions u, u' : E → F and a direction v : E,

TauCeti.HasWeakLineDerivOn μ Ω u u' v

says that the codomain F is complete, that u and u' are locally integrable on Ω, and that

∫ (∂_v φ) • u ∂μ = - ∫ φ • u' ∂μ

for every test function φ ∈ 𝓓(Ω, ℝ); for the intended μ, an additive Haar measure, this says that u' represents the distributional derivative ∂_v u on Ω (see The measure below). The bundled test-function type TestFunction of Mathlib/Analysis/Distribution/TestFunction.lean is the class of admissible φ, so the test objects are exactly the distributional ones; TauCeti.hasWeakLineDerivOn_iff restates the identity in terms of unbundled smooth compactly supported functions when that is more convenient.

Assembling the directions gives TauCeti.HasWeakFDerivOn μ Ω u U for a candidate weak derivative U : E → E →L[ℝ] F, the object whose Lᵖ integrability cuts out W^{1,p}(Ω).

Two facts make the notion usable, and both are proved here.

Nothing here assumes that Ω is bounded or that its boundary is regular: the weak derivative is a purely interior notion, and boundary hypotheses enter only with traces and extensions.

Local integrability #

LocallyIntegrableOn u Ω μ and LocallyIntegrableOn u' Ω μ are part of the definition rather than side hypotheses on the theorems. That is the textbook statement — a weak derivative is a relation between two members of L¹_loc(Ω) — and in Lean it is also what makes the predicate say what it claims: MeasureTheory.integral is 0 on a function that is not integrable, so the bare integration-by-parts identity is satisfied spuriously by junk-valued pairs, for instance by any u with a non-integrable singularity inside Ω together with u' = 0. Mathlib guards the same corner in TestFunction.integralAgainstBilinCLM, which pairs against a function only when it is locally integrable on Ω and is the zero map otherwise.

The components are projected out by TauCeti.HasWeakLineDerivOn.completeSpace, TauCeti.HasWeakLineDerivOn.locallyIntegrableOn, TauCeti.HasWeakLineDerivOn.locallyIntegrableOn_deriv and TauCeti.HasWeakLineDerivOn.integral_lineDeriv_smul_eq_neg_integral_smul, so a proof never has to unfold the definition.

The codomain #

CompleteSpace F is a component of the definition, for the same reason local integrability is. MeasureTheory.integral is defined to be 0 on an incomplete codomain, so for an incomplete F the identity above would read 0 = -0 and the predicate would degenerate into local integrability of u and u', making every locally integrable function a weak derivative of every other. Carrying completeness makes the predicate say what its name claims for every F, and TauCeti.HasWeakLineDerivOn.completeSpace recovers the instance — usually as have := h.completeSpace — so the results that consume it, such as the fundamental lemma of the calculus of variations behind TauCeti.HasWeakLineDerivOn.ae_eq, get it from the hypothesis.

The measure #

The defining identity is not the distributional derivative for an arbitrary μ, and is not advertised as one. Integrating against μ produces the adjoint of ∂_v relative to μ: for a weighted μ = volume.withDensity w, the identity reads ∂_v (w • u) = w • u' in the sense of distributions, a condition on u and u' in which the weight cannot be cancelled: it constrains w • u', not u', so a constant u need not have weak derivative 0. Exactly when μ is translation invariant — an additive Haar measure, hence a positive multiple of Lebesgue measure on a finite-dimensional E — does the identity say that u' represents ∂_v u as a distribution on Ω, and that is the μ out of which W^{k,p}(Ω) will be built.

Accordingly [μ.IsAddHaarMeasure] is a hypothesis of every result below that ties the notion to the classical derivative: TauCeti.hasWeakLineDerivOn_of_hasLineDerivAt, TauCeti.hasWeakLineDerivOn_const, TauCeti.hasWeakFDerivOn_of_differentiableOn, TauCeti.HasWeakLineDerivOn.ae_eq_lineDeriv and TauCeti.HasWeakFDerivOn.ae_eq_fderiv. It is carried by those results rather than built into the definition, following Mathlib's own treatment of MeasureTheory.convolution, whose definition takes a bare μ and whose group-invariance hypotheses sit on the lemmas that need them: locality, linearity and almost-everywhere uniqueness are true of the adjoint relation for every μ, and stating them for a Haar measure only would weaken them for no gain.

Main declarations #

Derivatives of test functions #

theorem TauCeti.lineDeriv_eq_zero_of_notMem_tsupport {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {Ω : TopologicalSpace.Opens E} (φ : TestFunction Ω ℝ ⊤) {x : E} (hx : x ∉ tsupport ⇑φ) (v : E) :
lineDeriv ℝ (⇑φ) x v = 0

Outside its support, the directional derivative of a test function vanishes.

The definitions #

HasWeakLineDerivOn μ Ω u u' v says that u' is a weak derivative of u in the direction v on the open set Ω, relative to the measure μ: the codomain F is complete, both functions are locally integrable on Ω, and the integration-by-parts identity

∫ (∂_v φ) • u ∂μ = - ∫ φ • u' ∂μ

holds for every test function φ : 𝓓(Ω, ℝ), that is, for every smooth φ : E → ℝ whose support is compact and contained in Ω.

Local integrability and completeness of F are part of the definition because without them the identity is a statement about junk-valued integrals — MeasureTheory.integral is 0 on a non-integrable function, and 0 outright on an incomplete codomain — and would be satisfied by pairs that are not weakly differentiable at all; see the module docstring. They are recovered by TauCeti.HasWeakLineDerivOn.locallyIntegrableOn, .locallyIntegrableOn_deriv and .completeSpace, the last of which is how a proof gets the CompleteSpace F instance.

For the intended μ, an additive Haar measure, this says exactly that u' represents the distributional derivative ∂_v u on Ω, and [μ.IsAddHaarMeasure] is the hypothesis of every result identifying the two (TauCeti.hasWeakLineDerivOn_of_hasLineDerivAt and TauCeti.hasWeakLineDerivOn_const among them). For a μ that is not translation invariant the identity is instead the adjoint of ∂_v relative to μ — with a weight w it describes ∂_v (w • u), so a constant need not have weak derivative 0; see the module docstring.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    theorem TauCeti.hasWeakLineDerivOn_iff_testFunction {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} {v : E} [MeasurableSpace E] {μ : MeasureTheory.Measure E} {u u' : E → F} :
    HasWeakLineDerivOn μ Ω u u' v ↔ CompleteSpace F ∧ MeasureTheory.LocallyIntegrableOn u (↑Ω) μ ∧ MeasureTheory.LocallyIntegrableOn u' (↑Ω) μ ∧ ∀ (φ : TestFunction Ω ℝ ⊤), ∫ (x : E), lineDeriv ℝ (⇑φ) x v • u x ∂μ = -∫ (x : E), φ x • u' x ∂μ

    The constructor-and-eliminator form of HasWeakLineDerivOn, using bundled test functions. The definition is sealed by the module system, so downstream modules use this theorem rather than unfolding it.

    The codomain of a weak derivative is complete; use as have := h.completeSpace.

    A function that has a weak derivative on Ω is locally integrable on Ω.

    A weak derivative on Ω is locally integrable on Ω.

    theorem TauCeti.HasWeakLineDerivOn.integral_lineDeriv_smul_eq_neg_integral_smul {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} {v : E} [MeasurableSpace E] {μ : MeasureTheory.Measure E} {u u' : E → F} (h : HasWeakLineDerivOn μ Ω u u' v) (φ : TestFunction Ω ℝ ⊤) :
    ∫ (x : E), lineDeriv ℝ (⇑φ) x v • u x ∂μ = -∫ (x : E), φ x • u' x ∂μ

    The integration-by-parts identity defining a weak derivative.

    HasWeakFDerivOn μ Ω u U says that U : E → E →L[ℝ] F is a weak (Fréchet) derivative of u on the open set Ω: for every direction v, the function x ↦ U x v is a weak derivative of u in the direction v. In particular F is complete and u and each x ↦ U x v are locally integrable on Ω.

    Requiring u and U to be Lᵖ on Ω is what cuts out the first-order Sobolev space W^{1,p}(Ω).

    Equations
    Instances For
      theorem TauCeti.hasWeakFDerivOn_iff {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} [MeasurableSpace E] {μ : MeasureTheory.Measure E} {u : E → F} {U : E → E →L[ℝ] F} :
      HasWeakFDerivOn μ Ω u U ↔ ∀ (v : E), HasWeakLineDerivOn μ Ω u (fun (x : E) => (U x) v) v

      A weak Fréchet derivative is equivalently a weak directional derivative in every direction. This is the constructor-and-eliminator form of HasWeakFDerivOn; its sealed definition cannot be unfolded from a downstream module.

      The codomain of a weak Fréchet derivative is complete; use as have := h.completeSpace.

      A function that has a weak Fréchet derivative on Ω is locally integrable on Ω.

      theorem TauCeti.hasWeakLineDerivOn_iff {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} {v : E} [MeasurableSpace E] {μ : MeasureTheory.Measure E} {u u' : E → F} [CompleteSpace F] (hu : MeasureTheory.LocallyIntegrableOn u (↑Ω) μ) (hu' : MeasureTheory.LocallyIntegrableOn u' (↑Ω) μ) :
      HasWeakLineDerivOn μ Ω u u' v ↔ ∀ (φ : E → ℝ), ContDiff ℝ (↑⊤) φ → HasCompactSupport φ → tsupport φ ⊆ ↑Ω → ∫ (x : E), lineDeriv ℝ φ x v • u x ∂μ = -∫ (x : E), φ x • u' x ∂μ

      The defining identity of a weak derivative, stated for unbundled test functions: for a complete F and locally integrable u and u', weak differentiability is exactly the integration-by-parts identity against every smooth compactly supported function with support inside Ω.

      theorem TauCeti.HasWeakLineDerivOn.mono {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} {v : E} [MeasurableSpace E] {μ : MeasureTheory.Measure E} {u u' : E → F} {Ω' : TopologicalSpace.Opens E} (h : HasWeakLineDerivOn μ Ω u u' v) (hΩ : Ω' ≤ Ω) :
      HasWeakLineDerivOn μ Ω' u u' v

      A weak derivative on Ω is a weak derivative on every smaller open set: weak differentiability is a local notion.

      theorem TauCeti.HasWeakFDerivOn.mono {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} [MeasurableSpace E] {μ : MeasureTheory.Measure E} {u : E → F} {U : E → E →L[ℝ] F} {Ω' : TopologicalSpace.Opens E} (h : HasWeakFDerivOn μ Ω u U) (hΩ : Ω' ≤ Ω) :
      HasWeakFDerivOn μ Ω' u U

      A weak Fréchet derivative on Ω is one on every smaller open set.

      theorem TauCeti.HasWeakFDerivOn.hasWeakLineDerivOn {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} [MeasurableSpace E] {μ : MeasureTheory.Measure E} {u : E → F} {U : E → E →L[ℝ] F} (h : HasWeakFDerivOn μ Ω u U) (v : E) :
      HasWeakLineDerivOn μ Ω u (fun (x : E) => (U x) v) v

      Every direction of a weak Fréchet derivative is a weak directional derivative.

      @[simp]

      The zero function has weak derivative 0 in every direction, for every μ: no translation invariance is needed, since both sides of the defining identity vanish. Completeness of F is assumed because it is part of TauCeti.HasWeakLineDerivOn. This is the zero of the vector space structure that TauCeti.HasWeakLineDerivOn.add, .neg and .const_smul supply.

      @[simp]

      The zero function has weak Fréchet derivative 0, for every μ.

      theorem TauCeti.HasWeakLineDerivOn.neg {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} {v : E} [MeasurableSpace E] {μ : MeasureTheory.Measure E} {u u' : E → F} (h : HasWeakLineDerivOn μ Ω u u' v) :
      HasWeakLineDerivOn μ Ω (-u) (-u') v

      Weak differentiation commutes with negation.

      theorem TauCeti.HasWeakFDerivOn.neg {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} [MeasurableSpace E] {μ : MeasureTheory.Measure E} {u : E → F} {U : E → E →L[ℝ] F} (h : HasWeakFDerivOn μ Ω u U) :
      HasWeakFDerivOn μ Ω (-u) (-U)

      Weak Fréchet differentiation commutes with negation.

      theorem TauCeti.HasWeakLineDerivOn.const_smul {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} {v : E} [MeasurableSpace E] {μ : MeasureTheory.Measure E} {u u' : E → F} (h : HasWeakLineDerivOn μ Ω u u' v) (c : ℝ) :
      HasWeakLineDerivOn μ Ω (c • u) (c • u') v

      Weak differentiation commutes with multiplication by a real scalar.

      theorem TauCeti.HasWeakFDerivOn.const_smul {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} [MeasurableSpace E] {μ : MeasureTheory.Measure E} {u : E → F} {U : E → E →L[ℝ] F} (h : HasWeakFDerivOn μ Ω u U) (c : ℝ) :
      HasWeakFDerivOn μ Ω (c • u) (c • U)

      Weak Fréchet differentiation commutes with multiplication by a real scalar.

      Integrability of the defining integrands #

      A test function on Ω scales a function locally integrable on Ω to a globally integrable one: this is TestFunction.integrable_bilin for scalar multiplication.

      The direction-v derivative of a test function on Ω is again a test function on Ω, so it too scales a function locally integrable on Ω to a globally integrable one.

      theorem TauCeti.setIntegral_smul_eq_integral_smul {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} [MeasurableSpace E] {μ : MeasureTheory.Measure E} {w : E → F} (φ : TestFunction Ω ℝ ⊤) :
      ∫ (x : E) in ↑Ω, φ x • w x ∂μ = ∫ (x : E), φ x • w x ∂μ

      A test function on Ω vanishes off Ω, so integrating φ • w over Ω is the same as integrating it over the whole space.

      theorem TauCeti.setIntegral_lineDeriv_smul_eq_integral_lineDeriv_smul {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} [MeasurableSpace E] {μ : MeasureTheory.Measure E} {w : E → F} (φ : TestFunction Ω ℝ ⊤) (v : E) :
      ∫ (x : E) in ↑Ω, lineDeriv ℝ (⇑φ) x v • w x ∂μ = ∫ (x : E), lineDeriv ℝ (⇑φ) x v • w x ∂μ

      The direction-v derivative of a test function on Ω vanishes off Ω too, so the same truncation holds for (∂_v φ) • w.

      theorem TauCeti.HasWeakLineDerivOn.congr_ae {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} {v : E} [MeasurableSpace E] [OpensMeasurableSpace E] {μ : MeasureTheory.Measure E} {u u' w : E → F} (h : HasWeakLineDerivOn μ Ω u u' v) (hw : u =ᵐ[μ.restrict ↑Ω] w) :
      HasWeakLineDerivOn μ Ω w u' v

      Replacing u by a function agreeing with it almost everywhere on Ω preserves the weak derivative: only the restriction of u to Ω is seen.

      theorem TauCeti.HasWeakLineDerivOn.congr_ae_deriv {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} {v : E} [MeasurableSpace E] [OpensMeasurableSpace E] {μ : MeasureTheory.Measure E} {u u' w : E → F} (h : HasWeakLineDerivOn μ Ω u u' v) (hw : u' =ᵐ[μ.restrict ↑Ω] w) :
      HasWeakLineDerivOn μ Ω u w v

      Replacing u' by a function agreeing with it almost everywhere on Ω preserves the weak derivative.

      theorem TauCeti.HasWeakFDerivOn.congr_ae {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} [MeasurableSpace E] [OpensMeasurableSpace E] {μ : MeasureTheory.Measure E} {u : E → F} {U : E → E →L[ℝ] F} {w : E → F} (h : HasWeakFDerivOn μ Ω u U) (hw : u =ᵐ[μ.restrict ↑Ω] w) :
      HasWeakFDerivOn μ Ω w U

      Replacing u by a function agreeing with it almost everywhere on Ω preserves the weak Fréchet derivative.

      theorem TauCeti.HasWeakFDerivOn.congr_ae_deriv {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} [MeasurableSpace E] [OpensMeasurableSpace E] {μ : MeasureTheory.Measure E} {u : E → F} {U W : E → E →L[ℝ] F} (h : HasWeakFDerivOn μ Ω u U) (hW : U =ᵐ[μ.restrict ↑Ω] W) :
      HasWeakFDerivOn μ Ω u W

      Replacing U by a map agreeing with it almost everywhere on Ω preserves the weak Fréchet derivative.

      theorem TauCeti.HasWeakLineDerivOn.indicator {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} {v : E} [MeasurableSpace E] [OpensMeasurableSpace E] {μ : MeasureTheory.Measure E} {u u' : E → F} (h : HasWeakLineDerivOn μ Ω u u' v) :
      HasWeakLineDerivOn μ Ω ((↑Ω).indicator u) ((↑Ω).indicator u') v

      Extending a function and its weak directional derivative by zero preserves the weak derivative on the original domain Ω.

      theorem TauCeti.HasWeakFDerivOn.indicator {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} [MeasurableSpace E] [OpensMeasurableSpace E] {μ : MeasureTheory.Measure E} {u : E → F} {U : E → E →L[ℝ] F} (h : HasWeakFDerivOn μ Ω u U) :
      HasWeakFDerivOn μ Ω ((↑Ω).indicator u) ((↑Ω).indicator U)

      Extending a function and its weak Fréchet derivative field by zero preserves the weak derivative on the original domain Ω.

      Linearity #

      theorem TauCeti.HasWeakLineDerivOn.add {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} {v : E} [MeasurableSpace E] [OpensMeasurableSpace E] {μ : MeasureTheory.Measure E} {u₁ u₁' u₂ u₂' : E → F} (h₁ : HasWeakLineDerivOn μ Ω u₁ u₁' v) (h₂ : HasWeakLineDerivOn μ Ω u₂ u₂' v) :
      HasWeakLineDerivOn μ Ω (u₁ + u₂) (u₁' + u₂') v

      Weak differentiation is additive.

      theorem TauCeti.HasWeakLineDerivOn.sub {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} {v : E} [MeasurableSpace E] [OpensMeasurableSpace E] {μ : MeasureTheory.Measure E} {u₁ u₁' u₂ u₂' : E → F} (h₁ : HasWeakLineDerivOn μ Ω u₁ u₁' v) (h₂ : HasWeakLineDerivOn μ Ω u₂ u₂' v) :
      HasWeakLineDerivOn μ Ω (u₁ - u₂) (u₁' - u₂') v

      Weak differentiation is compatible with subtraction.

      theorem TauCeti.HasWeakLineDerivOn.sum {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} {v : E} [MeasurableSpace E] [OpensMeasurableSpace E] {μ : MeasureTheory.Measure E} {ι : Type u_3} [CompleteSpace F] {w w' : ι → E → F} (s : Finset ι) (h : ∀ i ∈ s, HasWeakLineDerivOn μ Ω (w i) (w' i) v) :
      HasWeakLineDerivOn μ Ω (fun (x : E) => ∑ i ∈ s, w i x) (fun (x : E) => ∑ i ∈ s, w' i x) v

      Weak differentiation commutes with a finite sum of functions.

      theorem TauCeti.HasWeakLineDerivOn.clm_comp {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} {v : E} [MeasurableSpace E] [OpensMeasurableSpace E] {μ : MeasureTheory.Measure E} {u u' : E → F} {G : Type u_3} [NormedAddCommGroup G] [NormedSpace ℝ G] [CompleteSpace G] (h : HasWeakLineDerivOn μ Ω u u' v) (L : F →L[ℝ] G) :
      HasWeakLineDerivOn μ Ω (fun (x : E) => L (u x)) (fun (x : E) => L (u' x)) v

      Weak differentiation commutes with a continuous linear map on the codomain.

      theorem TauCeti.HasWeakFDerivOn.add {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} [MeasurableSpace E] [OpensMeasurableSpace E] {μ : MeasureTheory.Measure E} {u₁ u₂ : E → F} {U₁ U₂ : E → E →L[ℝ] F} (h₁ : HasWeakFDerivOn μ Ω u₁ U₁) (h₂ : HasWeakFDerivOn μ Ω u₂ U₂) :
      HasWeakFDerivOn μ Ω (u₁ + u₂) (U₁ + U₂)

      Weak Fréchet differentiation is additive.

      theorem TauCeti.HasWeakFDerivOn.sub {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} [MeasurableSpace E] [OpensMeasurableSpace E] {μ : MeasureTheory.Measure E} {u₁ u₂ : E → F} {U₁ U₂ : E → E →L[ℝ] F} (h₁ : HasWeakFDerivOn μ Ω u₁ U₁) (h₂ : HasWeakFDerivOn μ Ω u₂ U₂) :
      HasWeakFDerivOn μ Ω (u₁ - u₂) (U₁ - U₂)

      Weak Fréchet differentiation is compatible with subtraction.

      In the direction 0 every locally integrable function has weak derivative 0.

      theorem TauCeti.HasWeakLineDerivOn.add_direction {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} [MeasurableSpace E] [OpensMeasurableSpace E] {μ : MeasureTheory.Measure E} {u u₁' u₂' : E → F} {v₁ v₂ : E} (h₁ : HasWeakLineDerivOn μ Ω u u₁' v₁) (h₂ : HasWeakLineDerivOn μ Ω u u₂' v₂) :
      HasWeakLineDerivOn μ Ω u (u₁' + u₂') (v₁ + v₂)

      The weak derivative is additive in the direction of differentiation. Together with TauCeti.HasWeakLineDerivOn.smul_direction this is what makes packaging the directional weak derivatives into a single continuous linear map, as TauCeti.HasWeakFDerivOn does, the right move.

      theorem TauCeti.HasWeakLineDerivOn.sum_direction {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} [MeasurableSpace E] [OpensMeasurableSpace E] {μ : MeasureTheory.Measure E} {ι : Type u_3} [CompleteSpace F] {u : E → F} {u' : ι → E → F} {w : ι → E} (s : Finset ι) (hu : MeasureTheory.LocallyIntegrableOn u (↑Ω) μ) (h : ∀ i ∈ s, HasWeakLineDerivOn μ Ω u (u' i) (w i)) :
      HasWeakLineDerivOn μ Ω u (fun (x : E) => ∑ i ∈ s, u' i x) (∑ i ∈ s, w i)

      The weak derivative is additive over a finite sum of directions.

      Scaling the direction #

      theorem TauCeti.HasWeakLineDerivOn.smul_direction {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} {v : E} [MeasurableSpace E] {μ : MeasureTheory.Measure E} {u u' : E → F} (h : HasWeakLineDerivOn μ Ω u u' v) (c : ℝ) :
      HasWeakLineDerivOn μ Ω u (c • u') (c • v)

      The weak derivative is homogeneous in the direction of differentiation.

      Assembling the directions of a basis #

      theorem Module.Basis.hasWeakFDerivOn_of_forall {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} [MeasurableSpace E] [OpensMeasurableSpace E] {μ : MeasureTheory.Measure E} {u : E → F} {ι : Type u_3} [CompleteSpace F] (b : Basis ι ℝ E) {U : E → E →L[ℝ] F} (hu : MeasureTheory.LocallyIntegrableOn u (↑Ω) μ) (h : ∀ (i : ι), TauCeti.HasWeakLineDerivOn μ Ω u (fun (x : E) => (U x) (b i)) (b i)) :

      A weak Fréchet derivative is detected on a basis of directions. If a candidate U : E → E →L[ℝ] F is a weak derivative of u in each direction of a basis of E, it is a weak derivative of u in every direction, since every vector is a finite linear combination of basis vectors. Local integrability of u is a separate hypothesis because it is not implied by the basis directions when E is trivial.

      Classical derivatives are weak derivatives #

      This is where the measure has to be an additive Haar measure: integration by parts is available only for a translation-invariant μ, and it is what makes the weak derivative of this section the classical one.

      A classical derivative is a weak derivative. If u has line derivative u' x in the direction v at every point of the open set Ω, and both u and u' are locally integrable on Ω, then u' is a weak derivative of u in the direction v on Ω. Completeness of F is assumed because it is part of TauCeti.HasWeakLineDerivOn.

      The proof is Mathlib's integration by parts applied to u against a test function; the boundary term is absent because the test function has compact support inside Ω.

      theorem TauCeti.hasWeakLineDerivOn_const {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} {v : E} [MeasurableSpace E] [BorelSpace E] [FiniteDimensional ℝ E] [CompleteSpace F] {μ : MeasureTheory.Measure E} [μ.IsAddHaarMeasure] (c : F) :
      HasWeakLineDerivOn μ Ω (fun (x : E) => c) (fun (x : E) => 0) v

      A constant function has weak derivative 0 in every direction, for μ an additive Haar measure: the first sanity check that TauCeti.HasWeakLineDerivOn is not vacuous. Translation invariance of μ is needed — against a weighted measure a constant pairs with ∂_v of the weight.

      A classical Fréchet derivative is a weak one. If u is differentiable at every point of the open set Ω, and both u and fderiv ℝ u are locally integrable on Ω, then fderiv ℝ u is a weak derivative of u on Ω.

      Test functions are weakly differentiable #

      A test function is the basic example: it is smooth, so its classical derivative is also a weak one. On an inner product space the derivative is recorded through its Riesz representative, the gradient, which is the form in which the Sobolev spaces consume it.

      A test function is weakly differentiable, with weak derivative the continuous linear functional represented by its gradient.

      Uniqueness #

      theorem TauCeti.HasWeakLineDerivOn.ae_eq {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} {v : E} [MeasurableSpace E] [BorelSpace E] [FiniteDimensional ℝ E] {μ : MeasureTheory.Measure E} {u u₁' u₂' : E → F} (h₁ : HasWeakLineDerivOn μ Ω u u₁' v) (h₂ : HasWeakLineDerivOn μ Ω u u₂' v) :
      u₁' =ᵐ[μ.restrict ↑Ω] u₂'

      A weak derivative is unique almost everywhere. Two weak derivatives of u in the same direction on Ω agree almost everywhere on Ω.

      This is the fundamental lemma of the calculus of variations: their difference integrates to zero against every test function supported in Ω, and both are locally integrable on Ω because that is part of TauCeti.HasWeakLineDerivOn. Completeness of F, which that lemma needs, comes from h₁ for the same reason.

      theorem TauCeti.HasWeakFDerivOn.ae_eq {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} [MeasurableSpace E] [BorelSpace E] [FiniteDimensional ℝ E] {μ : MeasureTheory.Measure E} {u : E → F} {U₁ U₂ : E → E →L[ℝ] F} (h₁ : HasWeakFDerivOn μ Ω u U₁) (h₂ : HasWeakFDerivOn μ Ω u U₂) :
      U₁ =ᵐ[μ.restrict ↑Ω] U₂

      A weak Fréchet derivative is unique almost everywhere. Two weak derivatives of u on Ω agree almost everywhere on Ω.

      The directional statement TauCeti.HasWeakLineDerivOn.ae_eq is applied along the finitely many vectors of a basis of E, and the resulting almost-everywhere statements are intersected.

      The weak derivative of a classically differentiable function #

      theorem TauCeti.HasWeakLineDerivOn.ae_eq_lineDeriv {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} {v : E} [MeasurableSpace E] [BorelSpace E] [FiniteDimensional ℝ E] {μ : MeasureTheory.Measure E} [μ.IsAddHaarMeasure] {u u' : E → F} (h : HasWeakLineDerivOn μ Ω u u' v) (hd : MeasureTheory.LocallyIntegrableOn (fun (x : E) => lineDeriv ℝ u x v) (↑Ω) μ) (hdiff : ∀ x ∈ ↑Ω, LineDifferentiableAt ℝ u x v) :
      u' =ᵐ[μ.restrict ↑Ω] fun (x : E) => lineDeriv ℝ u x v

      The weak derivative of a classically differentiable function is the classical one. If u has a line derivative in the direction v at every point of Ω, and that line derivative is locally integrable on Ω, then any weak derivative of u in that direction agrees with it almost everywhere on Ω. Local integrability of u itself and completeness of F are not hypotheses here: they are already part of h.

      Combined with TauCeti.hasWeakLineDerivOn_of_hasLineDerivAt, this says that the weak derivative extends the classical one without changing it where the classical one exists.

      theorem TauCeti.HasWeakFDerivOn.ae_eq_fderiv {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {Ω : TopologicalSpace.Opens E} [MeasurableSpace E] [BorelSpace E] [FiniteDimensional ℝ E] {μ : MeasureTheory.Measure E} [μ.IsAddHaarMeasure] {u : E → F} {U : E → E →L[ℝ] F} (h : HasWeakFDerivOn μ Ω u U) (hd : MeasureTheory.LocallyIntegrableOn (fderiv ℝ u) (↑Ω) μ) (hdiff : ∀ x ∈ ↑Ω, DifferentiableAt ℝ u x) :
      U =ᵐ[μ.restrict ↑Ω] fderiv ℝ u

      The weak Fréchet derivative of a differentiable function is fderiv. If u is differentiable at every point of Ω and fderiv ℝ u is locally integrable on Ω, then any weak Fréchet derivative of u agrees with fderiv ℝ u almost everywhere on Ω. Local integrability of u itself and completeness of F are not hypotheses here: they are already part of h.