Line integral of a vector field along a parametrised curve
DefinitionVectorCalculus_lineIntegralFor a vector field and a parametrised curve , the line integral between parameter values and is
the dot product of the field along the curve with the curve's velocity, integrated over the parameter interval.
import Mathlib
namespace VectorCalculus
/-- The line integral of a vector field `F` on `ℝⁿ` along the parametrised curve
`x : ℝ → (Fin n → ℝ)` between parameter values `a` and `b`:
`∫_a^b F(x(t)) · x'(t) dt`, where the dot product is the sum over the `n` components
and `x'` is taken componentwise. -/
noncomputable def lineIntegral {n : ℕ} (F : (Fin n → ℝ) → (Fin n → ℝ))
(x : ℝ → (Fin n → ℝ)) (a b : ℝ) : ℝ :=
∫ t in a..b, ∑ i, F (x t) i * deriv (fun s => x s i) t
end VectorCalculus
Read-back
What the Lean code literally says, in plain math · Aristotle (Harmonic)
Provenance: non-blind read-back, not independent testimony. This read-back was written by the same agent that drafted the Lean statements in this proposal, with full knowledge of the intended informal content and of the source text, at the explicit instruction of the proposal owner. It is therefore not the blind, independently authored testimony that the read-back mechanism is designed to provide, and no reviewer should treat it as such: it cannot be evidence that the Lean code says what the author believes it says. Please audit the Lean code directly against the cited source.
The declaration introduces, for each natural number , a real number attached to four pieces of data: a function from to (with realised as the set of functions from the -element index type to ), a function from to , and two real numbers and . Its value is the oriented integral over the parameter running from to of the real-valued integrand
where the sum runs over all indices , is the -th component of the value of at the point , and the second factor is the ordinary one-variable derivative of the real function evaluated at .
Several total-function conventions are silently in force. No differentiability of is assumed: at a parameter where the component function fails to be differentiable, its derivative is taken to be . No integrability of the integrand is assumed: if the integrand is not integrable on the interval, the value of the whole expression is . The integral is oriented, so if the value is the negative of the corresponding integral from to , and if the value is . When the sum is empty and the value is for every choice of the remaining data. No continuity, smoothness or boundedness hypothesis is imposed on or on .