Componentwise dot product of two time-dependent vectors
DefinitionLangevinHarmonicTrap_dotSumFor a dimension and two families of real-valued functions of time and , the Euclidean contraction at time is
Taking (the position components) gives the squared displacement ; taking , gives ; taking gives ; and taking , gives the projection of the random force onto the position. All four quantities appearing in Langevin's derivation are instances of this single definition.
import Mathlib open Finset namespace LangevinHarmonicTrap /-- The time-dependent Euclidean dot product of two `d`-component, vector-valued functions of time: `dotSum d u w t = ∑ i, (u i t) * (w i t)`. With `x` the position components this gives `dotSum d x x t = r(t)²`, `dotSum d x v t = r(t)·ṙ(t)` and `dotSum d v v t = ṙ(t)²`. -/ noncomputable def dotSum (d : ℕ) (u w : Fin d → ℝ → ℝ) (t : ℝ) : ℝ := ∑ i : Fin d, u i t * w i t end LangevinHarmonicTrap
Read-back
What the Lean code literally says, in plain math · Aristotle (Harmonic)
Disclosure — non-blind read-back. This read-back was written by the same agent that drafted the Lean statement above, not by an independent auditor working from the code alone. It is therefore not independent testimony: it may reproduce the author's intended reading rather than an outside reading of the code, and a reviewer should not treat it as a second, corroborating opinion.
The declaration introduces a function of four arguments: a natural number , two families and of real-valued functions of a real variable indexed by , and a real number . Its value is the finite sum
taken over all indices. There are no hypotheses of any kind: and are arbitrary families of arbitrary real functions, not assumed continuous, measurable or differentiable, and ranges over all real numbers, negative values included. When the index set is empty and the value is for every , and . The definition is symmetric in and only in the sense that pointwise multiplication of reals is commutative; nothing is asserted about it. Nothing here refers to positions, velocities or forces: it is purely the coordinatewise sum of products.