Noether 1918: the first-order variational set-up
DefinitionNoetherIVP_coreThis file sets up the objects of Emmy Noether's Invariante Variationsprobleme (1918) for a first-order variational problem with independent variables and dependent variables .
Derivatives on the base. For a scalar function on , is the derivative of at in the direction of the -th standard basis vector, and the divergence of a vector field is . For a field , the array of first derivatives is .
The Lagrangian and its partial derivatives. A Lagrangian is a function with and . Its partial derivatives and are the derivatives of the partially applied maps and in the direction of the corresponding basis vector. Along a field , and the momenta are .
Lagrange expressions. $\psi_iu = (\partial f/\partial q_i)(x,u(x),(\partial u)(x))
- \sum_l \partial_l p_{l i}u$: the left-hand sides of the Euler–Lagrange equations.
Variations. Given a variation field , the variation of the Lagrangian at fixed is ; the partial-integration vector of equation (3) is ; and Noether's vector of equation (12) is . Equation (9), which converts the generators of an infinitesimal transformation into a variation at fixed , is .
import Mathlib
/-!
# Noether, *Invariante Variationsprobleme* (1918) — the variational set-up
Formal counterparts of the objects Noether uses in §1–§2 of the paper, in the case of
`n` independent variables `x₁, …, xₙ`, `m` dependent variables `u₁, …, u_m`, and a
Lagrangian depending on the `u`'s and their first derivatives.
-/
namespace NoetherIVP
open Finset
/-- Partial derivative of a scalar field on `ℝⁿ` along the `l`-th coordinate. -/
noncomputable def dirD {n : ℕ} (l : Fin n) (g : (Fin n → ℝ) → ℝ) (x : Fin n → ℝ) : ℝ :=
fderiv ℝ g x (Pi.single l 1)
/-- Divergence `Div A = ∂A₁/∂x₁ + … + ∂Aₙ/∂xₙ` of a vector field on `ℝⁿ`. -/
noncomputable def divg {n : ℕ} (A : (Fin n → ℝ) → Fin n → ℝ) (x : Fin n → ℝ) : ℝ :=
∑ l : Fin n, dirD l (fun y => A y l) x
/-- The array of first derivatives `∂uᵢ/∂x_l` of a field `u : ℝⁿ → ℝᵐ`. -/
noncomputable def jac {n m : ℕ} (u : (Fin n → ℝ) → Fin m → ℝ) (x : Fin n → ℝ) :
Fin n → Fin m → ℝ := fun l i => dirD l (fun y => u y i) x
/-- Partial derivative `∂f/∂uᵢ` of the Lagrangian. -/
noncomputable def pdU {n m : ℕ}
(f : (Fin n → ℝ) → (Fin m → ℝ) → (Fin n → Fin m → ℝ) → ℝ) (i : Fin m)
(x : Fin n → ℝ) (q : Fin m → ℝ) (v : Fin n → Fin m → ℝ) : ℝ :=
fderiv ℝ (fun w : Fin m → ℝ => f x w v) q (Pi.single i 1)
/-- Partial derivative `∂f/∂(∂uᵢ/∂x_l)` of the Lagrangian. -/
noncomputable def pdV {n m : ℕ}
(f : (Fin n → ℝ) → (Fin m → ℝ) → (Fin n → Fin m → ℝ) → ℝ) (l : Fin n) (i : Fin m)
(x : Fin n → ℝ) (q : Fin m → ℝ) (v : Fin n → Fin m → ℝ) : ℝ :=
fderiv ℝ (fun w : Fin n → Fin m → ℝ => f x q w) v (Pi.single l (Pi.single i 1))
/-- The Lagrangian evaluated along a field `u`. -/
noncomputable def lagr {n m : ℕ}
(f : (Fin n → ℝ) → (Fin m → ℝ) → (Fin n → Fin m → ℝ) → ℝ)
(u : (Fin n → ℝ) → Fin m → ℝ) (x : Fin n → ℝ) : ℝ := f x (u x) (jac u x)
/-- The momentum `∂f/∂(∂uᵢ/∂x_l)` evaluated along a field `u`. -/
noncomputable def mom {n m : ℕ}
(f : (Fin n → ℝ) → (Fin m → ℝ) → (Fin n → Fin m → ℝ) → ℝ) (u : (Fin n → ℝ) → Fin m → ℝ)
(l : Fin n) (i : Fin m) (x : Fin n → ℝ) : ℝ := pdV f l i x (u x) (jac u x)
/-- The Lagrange expression `ψᵢ = ∂f/∂uᵢ - Σ_l ∂/∂x_l (∂f/∂(∂uᵢ/∂x_l))`. -/
noncomputable def lagrangeExpr {n m : ℕ}
(f : (Fin n → ℝ) → (Fin m → ℝ) → (Fin n → Fin m → ℝ) → ℝ) (u : (Fin n → ℝ) → Fin m → ℝ)
(i : Fin m) (x : Fin n → ℝ) : ℝ :=
pdU f i x (u x) (jac u x) - ∑ l : Fin n, dirD l (mom f u l i) x
/-- The variation `δf` of the Lagrangian produced by a variation field `δu` of the `u`'s
(the independent variables being held fixed). -/
noncomputable def varF {n m : ℕ}
(f : (Fin n → ℝ) → (Fin m → ℝ) → (Fin n → Fin m → ℝ) → ℝ)
(u du : (Fin n → ℝ) → Fin m → ℝ) (x : Fin n → ℝ) : ℝ :=
∑ i : Fin m, (pdU f i x (u x) (jac u x) * du x i
+ ∑ l : Fin n, pdV f l i x (u x) (jac u x) * dirD l (fun y => du y i) x)
/-- The boundary vector `A` produced by the partial integration in equation (3):
`A_l = -Σᵢ (∂f/∂(∂uᵢ/∂x_l)) δuᵢ`. -/
noncomputable def bdryA {n m : ℕ}
(f : (Fin n → ℝ) → (Fin m → ℝ) → (Fin n → Fin m → ℝ) → ℝ)
(u du : (Fin n → ℝ) → Fin m → ℝ) (x : Fin n → ℝ) (l : Fin n) : ℝ :=
-∑ i : Fin m, mom f u l i x * du x i
/-- Noether's vector `B = A - f · Δx` of equation (12). -/
noncomputable def curB {n m : ℕ}
(f : (Fin n → ℝ) → (Fin m → ℝ) → (Fin n → Fin m → ℝ) → ℝ)
(u du : (Fin n → ℝ) → Fin m → ℝ) (dx : (Fin n → ℝ) → Fin n → ℝ)
(x : Fin n → ℝ) (l : Fin n) : ℝ := bdryA f u du x l - lagr f u x * dx x l
/-- Equation (9): the variation `δuᵢ = Δuᵢ - Σ_l (∂uᵢ/∂x_l) Δx_l` attached to an
infinitesimal transformation with generators `Δu` and `Δx`. -/
noncomputable def deltaU {n m : ℕ} (u Du : (Fin n → ℝ) → Fin m → ℝ)
(dx : (Fin n → ℝ) → Fin n → ℝ) (x : Fin n → ℝ) (i : Fin m) : ℝ :=
Du x i - ∑ l : Fin n, jac u x l i * dx x l
end NoetherIVPRead-back
What the Lean code literally says, in plain math · Aristotle (Harmonic) — non-blind, same agent as the statement author
Provenance note — this read-back is NOT blind and NOT independent. It was written by the same agent that drafted the Lean statements in this proposal, at the explicit instruction of the mission owner, and not by a separate auditor working from the code alone with no knowledge of the intended meaning. It therefore carries none of the cross-checking value of an independent read-back and must not be mistaken for independent testimony; please audit the Lean statements directly, and consider commissioning an independent read-back before the proposal is submitted.
This bundle introduces notation for a first-order variational problem with independent and dependent variables; nothing here is an assertion, and no regularity is assumed anywhere, so every derivative below is the Lean Fréchet derivative, which takes the value whenever the function in question fails to be differentiable at the point.
For a natural number , an index , a function and a point ,
the derivative of at evaluated on the vector whose -th entry is and whose other entries are . For a vector field ,
a finite sum over the coordinate directions, equal to when . For , the array is the family indexed by and .
Given , a point , a value and an array :
where is the -th basis vector and is the array whose entry is and whose other entries are .
Along a field one sets and
Note that the subtracted term is the derivative of the function , itself defined through derivatives of ; where that function is not differentiable, the term contributes .
For a second map :
and, for a further map ,
Finally, for maps and ,
All sums are finite sums over index sets of size or and are when the index set is empty; in particular for every displayed sum over is , and for every divergence is .