IsTestFunction.divergence
theoremverifiedformalizationimported Lean
IsTestFunction.divergence
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in open Module in variable {X} [NormedAddCommGroup X] [NormedSpace ℝ X] {U} [NormedAddCommGroup U] [NormedSpace ℝ U] {V'} [NormedAddCommGroup V'] [NormedSpace ℝ V'] in open ContDiff InnerProductSpace MeasureTheory in @[fun_prop] lemma IsTestFunction.divergence {f : X → X} [FiniteDimensional ℝ X] (hf : IsTestFunction f) : IsTestFunction (fun x => divergence ℝ f x)
- Formalizes
- Physlib, `IsTestFunction.divergence`
- Lean proof
- By Tomas Skrivan, Joseph Tooby-Smith, from github.com/leanprover-community/physlib at
e411c6e89692(Copyright (c) 2025 Tomas Skrivan. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.34.1.IsTestFunction.divergence← IsTestFunction.divergence (Physlib/Mathematics/VariationalCalculus/IsTestFunction.lean:281): adapted
What was changed in
IsTestFunction.divergence--- Physlib/Mathematics/VariationalCalculus/IsTestFunction.lean:281 (IsTestFunction.divergence) +++ as compiled here @@ -1 +1,9 @@ +set_option autoImplicit true in +set_option relaxedAutoImplicit true in +open Module in +variable + {X} [NormedAddCommGroup X] [NormedSpace ℝ X] + {U} [NormedAddCommGroup U] [NormedSpace ℝ U] + {V'} [NormedAddCommGroup V'] [NormedSpace ℝ V'] in +open ContDiff InnerProductSpace MeasureTheory in @[fun_prop] - Verified
- 09 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 8
- IsTestFunction.sumIsTestFunction.sum
- divergence_zerodivergence_zero
- divergenceThe divergence of a map
f : E → EwhereEis a normed space over𝕜. - IsTestFunction.contDiffIsTestFunction.contDiff
- IsTestFunctionA test function is a smooth function with compact support.
- IsTestFunction.fderiv_applyIsTestFunction.fderiv_apply
- IsTestFunction.comp_leftIsTestFunction.comp_left
- divergence_eq_sum_fderiv'divergence_eq_sum_fderiv'
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
set_option autoImplicit true inset_option relaxedAutoImplicit true inopen Module invariable {X} [NormedAddCommGroup X] [NormedSpace ℝ X] {U} [NormedAddCommGroup U] [NormedSpace ℝ U] {V'} [NormedAddCommGroup V'] [NormedSpace ℝ V'] inopen ContDiff InnerProductSpace MeasureTheory in@[fun_prop]lemma IsTestFunction.divergence {f : X → X} [FiniteDimensional ℝ X] (hf : IsTestFunction f) : IsTestFunction (fun x => divergence ℝ f x) := by obtain ⟨s, ⟨bX⟩⟩ := Basis.exists_basis ℝ X have : Fintype s := FiniteDimensional.fintypeBasisIndex bX conv_rhs => enter [x] rw [divergence_eq_sum_fderiv' bX] apply IsTestFunction.sum intro i let reprMap : X →ₗ[ℝ] ℝ := { toFun := (bX.repr · i) map_add' := by simp map_smul' := by simp } let f' : X →L[ℝ] ℝ := reprMap.toContinuousLinearMap have h_trace_contDiff : ContDiff ℝ ∞ f' := f'.contDiff change IsTestFunction (fun x => f' ((fderiv ℝ f x) (bX i))) apply IsTestFunction.comp_left (f:=fun x : X => (fderiv ℝ f x) (bX i)) (g:=f') · fun_prop · simp [f'] · exact h_trace_contDiff