MATHLIBANNEX / CANONICAL DECLARATION CARD

Divergence as the trace of a derivative

MathlibAnnex.divergence

def

Defines divergence without choosing coordinates.

Statement

Let be a finite-dimensional real normed vector space and . The divergence of at is the trace of its real Fréchet derivative:

Definition

Here denotes the continuous linear derivative when it exists, and the zero map otherwise, following the source’s total derivative convention. The RHS takes the trace of that endomorphism. Thus this definition still returns a value at a nondifferentiability point; it does not assert that the classical derivative exists there.

Assumptions

The definition accepts every function and every point . It imposes neither differentiability nor a measure. Finite dimensionality is part of the definition’s domain; dimension zero is allowed.

Conclusion

The output is a real number. At a point where is differentiable, it is the usual divergence. In coordinates with a finite index set and coordinate vectors , For a differentiable field, writing identifies the summand as . The empty sum in dimension zero is zero.

The trace is independent of a basis. The coordinate identity follows by representing the derivative in the coordinate basis and summing its diagonal entries; the exact coordinate lemma is cited below. This identity also holds for the library’s total derivative convention.

Main citations

Lean source signature (exact)

def divergence [FiniteDimensional ℝ E] (W : E → E) (x : E) : ℝ :=
  LinearMap.trace ℝ E (fderiv ℝ W x).toLinearMap
In the source Mathematical meaning
{E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] The finite-dimensional real normed space , without a chosen coordinate basis.
(W : E → E) (x : E) : ℝ The arbitrary vector field , evaluation point , and real output .
In the source Mathematical meaning
fderiv ℝ W x The Fréchet derivative when it exists, and the zero continuous linear map otherwise. Differentiability is not a defining hypothesis.
LinearMap.trace ℝ E (fderiv ℝ W x).toLinearMap The entire RHS . The trace is basis independent; .toLinearMap forgets continuity while preserving the map.
Exact surrounding binder context (separate excerpts)

Exact source lines 7–12:

noncomputable section
open Set
open scoped BigOperators

namespace MathlibAnnex
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
Exact content identity

Declaration: MathlibAnnex.divergence

Accepted content SHA-256: 0eff187c71cf0c7055bfadca6dcea0338b72eb1a122df728cd86f03ac8100df1

Accepted source guide SHA-256: f496dbe5b89e58192f0a17f2914b5160ea9515e43a02088582f5fc8188d494f6

Source commit: 437e6e46228bbb8e91211ebded349d7a30020e73

Back to top ↑