Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Central force motion, the Kepler problem, and ellipses with a focus at the origin

Definition
DynamicsRelativity_CentralForces_Defs

by LG · Sep 22, 2026 · Mathlib 0df444a (Lean v4.33.1)

classical-mechanicsdynamical-systemsmathematical-physics

This bundle sets up the objects of Tong §4 (Central Forces), and is imported by every theorem of the mission.

The arena. A point particle moves in Euclidean 333-space, written Vec\mathrm{Vec}Vec, with its standard inner product ⟨⋅,⋅⟩\langle\cdot,\cdot\rangle⟨⋅,⋅⟩ and norm ∥⋅∥\lVert\cdot\rVert∥⋅∥. A trajectory is a map x:R→Vecx:\mathbb R\to\mathrm{Vec}x:R→Vec; its velocity x˙\dot xx˙ and acceleration x¨\ddot xx¨ are the first and second pointwise derivatives, and cross(a,b)\mathrm{cross}(a,b)cross(a,b) is the usual cross product a×ba\times ba×b.

Central force motion. Following Tong's equation (4.1), a particle of mass mmm moves in a central force field with radial profile FFF when

m x¨(t)  =  F(r(t)) x(t)r(t),r(t)=∥x(t)∥,m\,\ddot x(t) \;=\; F\big(r(t)\big)\,\frac{x(t)}{r(t)}, \qquad r(t)=\lVert x(t)\rVert ,mx¨(t)=F(r(t))r(t)x(t)​,r(t)=∥x(t)∥,

together with the standing conventions of the chapter: the mass is positive, the trajectory is twice continuously differentiable on all of R\mathbb RR, and it never meets the origin, where a central field is singular. For a force derived from a central potential VVV one has F=−dV/drF=-dV/drF=−dV/dr.

The Kepler problem. The inverse-square case is F(r)=−km/r2F(r)=-km/r^{2}F(r)=−km/r2, the force of Tong's potential (4.12) V(r)=−km/rV(r)=-km/rV(r)=−km/r, with k=GMk=GMk=GM for gravitational attraction. Unfolded, a Kepler motion satisfies mx¨=−km x/r3m\ddot x = -km\,x/r^{3}mx¨=−kmx/r3.

Conserved quantities. The angular momentum is the vector L(t)=m x(t)×x˙(t)L(t)=m\,x(t)\times\dot x(t)L(t)=mx(t)×x˙(t), and the total energy of the Kepler problem is

E(t)  =  12m∥x˙(t)∥2  −  kmr(t).E(t) \;=\; \tfrac12 m\lVert\dot x(t)\rVert^{2} \;-\; \frac{km}{r(t)} .E(t)=21​m∥x˙(t)∥2−r(t)km​.

Swept area. The area swept by the radius vector between two times is 12∫∥x×x˙∥ dt\tfrac12\int\lVert x\times\dot x\rVert\,dt21​∫∥x×x˙∥dt, the invariant form of the element δA=12r2δθ\delta A=\tfrac12 r^{2}\delta\thetaδA=21​r2δθ used in Tong §4.3.2.

Ellipse with a focus at the origin. A set SSS qualifies when there are a nonzero normal nnn, a second focus ccc with ⟨n,c⟩=0\langle n,c\rangle=0⟨n,c⟩=0, and a number aaa with ∥c∥<2a\lVert c\rVert<2a∥c∥<2a, such that SSS is exactly the set of points yyy of the plane ⟨n,y⟩=0\langle n,y\rangle=0⟨n,y⟩=0 with

∥y∥+∥y−c∥  =  2a.\lVert y\rVert + \lVert y-c\rVert \;=\; 2a .∥y∥+∥y−c∥=2a.

This is the two-foci ("string") characterization, with the origin as one of the two foci; the inequality ∥c∥<2a\lVert c\rVert<2a∥c∥<2a forces a>0a>0a>0 and rules out the degenerate loci, while c=0c=0c=0 gives a circle.

These definitions are the shared vocabulary of the whole series on the source notes: they are stated for a general central force wherever the source's result is general, and specialized to the inverse-square law only where it is needed.

Formalization Note. The arena is EuclideanSpace ℝ (Fin 3). Smoothness is ContDiff ℝ 2 and derivatives are Mathlib's deriv. The force enters through its radial profile FFF rather than through a potential, so no derivative of a potential is evaluated at a point where it may fail to exist.

Definition code
import Mathlib

namespace DynamicsRelativity

/-- Euclidean 3-space: the arena in which a point particle moves. -/
abbrev Vec : Type := EuclideanSpace ℝ (Fin 3)

/-- The cross product `a × b` of two vectors of Euclidean 3-space. -/
noncomputable def cross (a b : Vec) : Vec :=
  WithLp.toLp 2 (crossProduct a.ofLp b.ofLp)

/-- The velocity `ẋ` of a trajectory `x : ℝ → Vec`. -/
noncomputable def vel (x : ℝ → Vec) : ℝ → Vec := deriv x

/-- The acceleration `ẍ` of a trajectory `x : ℝ → Vec`. -/
noncomputable def acc (x : ℝ → Vec) : ℝ → Vec := deriv (deriv x)

/-- `CentralForceMotion m F x` says that `x : ℝ → Vec` is the trajectory of a point
particle of mass `m > 0` moving in a central force field whose radial component at
distance `r` from the origin is `F r`; that is, Tong eq. (4.1),
`m ẍ = F(r) r̂`, where `r = ‖x‖` and `r̂ = x / ‖x‖`.
For a force derived from a central potential `V(r)` one has `F = -dV/dr`.
The trajectory is assumed twice continuously differentiable and to avoid the
origin, where a central force field is generally singular. -/
structure CentralForceMotion (m : ℝ) (F : ℝ → ℝ) (x : ℝ → Vec) : Prop where
  /-- The particle has positive mass. -/
  mass_pos : 0 < m
  /-- The trajectory is twice continuously differentiable. -/
  smooth : ContDiff ℝ 2 x
  /-- The particle never reaches the centre of attraction. -/
  ne_origin : ∀ t, x t ≠ 0
  /-- Newton's second law for a central force. -/
  eom : ∀ t, m • acc x t = (F ‖x t‖ / ‖x t‖) • x t

/-- The radial force of the inverse-square (Kepler/Coulomb) law for a particle of
mass `m`: `F(r) = -k m / r²`, the force derived from Tong's potential (4.12)
`V(r) = -k m / r`. Here `k = GM` for gravity; `k > 0` is the attractive case. -/
noncomputable def keplerForce (k m : ℝ) (r : ℝ) : ℝ := -(k * m) / r ^ 2

/-- `KeplerMotion k m x`: the trajectory of a particle of mass `m` in the
inverse-square central field of strength `k` (Tong §4.3.1, the Kepler problem). -/
def KeplerMotion (k m : ℝ) (x : ℝ → Vec) : Prop :=
  CentralForceMotion m (keplerForce k m) x

/-- The angular momentum `L = m x × ẋ` of a particle of mass `m` (Tong §4, p. 48). -/
noncomputable def angularMomentum (m : ℝ) (x : ℝ → Vec) (t : ℝ) : Vec :=
  m • cross (x t) (vel x t)

/-- The total energy `E = ½ m ‖ẋ‖² - k m / r` of a particle of mass `m` in the
inverse-square field of strength `k` (Tong §4.3.1, using the potential (4.12)). -/
noncomputable def keplerEnergy (k m : ℝ) (x : ℝ → Vec) (t : ℝ) : ℝ :=
  (1 / 2) * m * ‖vel x t‖ ^ 2 - k * m / ‖x t‖

/-- The area swept out by the radius vector between times `t₀` and `t₁`
(Tong §4.3.2, `δA = ½ r² δθ`): for planar motion the element of area swept by the
segment joining the origin to the particle is `½ ‖x × ẋ‖ dt`. -/
noncomputable def sweptArea (x : ℝ → Vec) (t₀ t₁ : ℝ) : ℝ :=
  (1 / 2) * ∫ t in t₀..t₁, ‖cross (x t) (vel x t)‖

/-- `IsEllipseWithFocusAtOrigin S` says that `S` is a (possibly circular)
nondegenerate ellipse lying in a plane through the origin, having the origin as one
of its two foci. Concretely: there are a nonzero normal vector `n`, a second focus
`c` lying in the plane `n ᗮ` through the origin, and a real number `a` with
`‖c‖ < 2a`, such that `S` consists of exactly those points `y` of that plane whose
distances to the two foci `0` and `c` sum to `2a`. -/
def IsEllipseWithFocusAtOrigin (S : Set Vec) : Prop :=
  ∃ (n c : Vec) (a : ℝ), n ≠ 0 ∧ inner ℝ n c = 0 ∧ ‖c‖ < 2 * a ∧
    S = {y : Vec | inner ℝ n y = 0 ∧ ‖y‖ + ‖y - c‖ = 2 * a}

end DynamicsRelativity
Source
David Tong, Dynamics and Relativity, University of Cambridge Part IA Mathematical Tripos lecture notes, Lent 2013, http://www.damtp.cam.ac.uk/user/tong/relativity.html — §4 Central Forces, pp. 48–62; eq. (4.1) p. 48, eq. (4.5) p. 50, eq. (4.12) p. 56, and the area element of §4.3.2 p. 61.
Read-back

What the Lean code literally says, in plain math · aristotle-harmonic

⚠️ Not an independent read-back — please read first

This read-back is non-blind, and was written by the same agent that drafted the Lean statement it describes, at the explicit instruction of the proposal owner.

On this platform a read-back is normally written blind, by an independent auditor that has been shown only the Lean code — never the source text, the informal statement, or the author's intent. That independence is the whole point: it is what allows a reviewer to compare the read-back against the intended meaning and catch an unfaithful formalization.

This text cannot serve that purpose, because the same reading of the source produced both the Lean code and the description below; any misreading of the source is reproduced identically in both. It is the author's own restatement of its own code, not testimony from a second party, and no reviewer should count it as corroboration. An independent audit, if one is wanted, still needs to be carried out by an auditor that has seen only the Lean code.


This file introduces nine declarations, all in the namespace DynamicsRelativity.

The arena. Vec\mathrm{Vec}Vec abbreviates real Euclidean 333-space, carrying the standard inner product ⟨⋅,⋅⟩\langle\cdot,\cdot\rangle⟨⋅,⋅⟩ and the norm ∥⋅∥\lVert\cdot\rVert∥⋅∥ it induces.

Cross product. For a,b∈Veca,b\in\mathrm{Vec}a,b∈Vec, cross(a,b)\mathrm{cross}(a,b)cross(a,b) converts aaa and bbb to plain coordinate triples, applies the ordinary cross product, and converts back; with 000-based indices its components are (a1b2−a2b1,  a2b0−a0b2,  a0b1−a1b0)(a_1b_2-a_2b_1,\;a_2b_0-a_0b_2,\;a_0b_1-a_1b_0)(a1​b2​−a2​b1​,a2​b0​−a0​b2​,a0​b1​−a1​b0​).

Velocity and acceleration. For a curve x:R→Vecx:\mathbb R\to\mathrm{Vec}x:R→Vec, vel(x)\mathrm{vel}(x)vel(x) is the pointwise derivative of xxx and acc(x)\mathrm{acc}(x)acc(x) is the pointwise derivative of vel(x)\mathrm{vel}(x)vel(x). Both are total operations: at a time where the function being differentiated is not differentiable, the value returned is the vector 000 rather than being undefined.

Central force motion. For a real number mmm, a function F:R→RF:\mathbb R\to\mathbb RF:R→R and a curve xxx, the proposition CentralForceMotion(m,F,x)\mathrm{CentralForceMotion}(m,F,x)CentralForceMotion(m,F,x) is the conjunction of exactly four conditions:

  1. m>0m>0m>0;
  2. xxx is twice continuously differentiable on all of R\mathbb RR;
  3. x(t)≠0x(t)\neq 0x(t)=0 for every real ttt;
  4. for every real ttt,
m acc(x)(t)  =  F(∥x(t)∥)∥x(t)∥  x(t).m\,\mathrm{acc}(x)(t) \;=\; \frac{F\big(\lVert x(t)\rVert\big)}{\lVert x(t)\rVert}\;x(t).macc(x)(t)=∥x(t)∥F(∥x(t)∥)​x(t).

FFF is an arbitrary real-valued function of a real variable, subject to no continuity, sign or growth condition, and it is only ever evaluated at the nonnegative number ∥x(t)∥\lVert x(t)\rVert∥x(t)∥. Condition 3 makes the division in condition 4 well defined. Time ranges over all of R\mathbb RR, so only globally defined trajectories satisfy this.

Inverse-square radial force. keplerForce(k,m)(r)=−kmr2\mathrm{keplerForce}(k,m)(r) = -\dfrac{km}{r^{2}}keplerForce(k,m)(r)=−r2km​ for real k,m,rk,m,rk,m,r. At r=0r=0r=0 the expression evaluates to 000, since division by zero returns 000. No condition constrains the sign of kkk or of mmm in this definition.

Kepler motion. KeplerMotion(k,m,x)\mathrm{KeplerMotion}(k,m,x)KeplerMotion(k,m,x) is defined to be CentralForceMotion(m,keplerForce(k,m),x)\mathrm{CentralForceMotion}\big(m,\mathrm{keplerForce}(k,m),x\big)CentralForceMotion(m,keplerForce(k,m),x). Unfolded it says: m>0m>0m>0; xxx is twice continuously differentiable; x(t)≠0x(t)\neq0x(t)=0 for all ttt; and for all ttt,

m x¨(t)  =  − k m∥x(t)∥3 x(t).m\,\ddot x(t) \;=\; -\,\frac{k\,m}{\lVert x(t)\rVert^{3}}\,x(t).mx¨(t)=−∥x(t)∥3km​x(t).

The sign of kkk is not constrained by this definition: k>0k>0k>0 gives an attractive field, k<0k<0k<0 a repulsive one, and k=0k=0k=0 free motion in a straight line.

Angular momentum. angularMomentum(m,x)(t)=m cross(x(t),vel(x)(t))\mathrm{angularMomentum}(m,x)(t) = m\,\mathrm{cross}\big(x(t),\mathrm{vel}(x)(t)\big)angularMomentum(m,x)(t)=mcross(x(t),vel(x)(t)), a vector depending on the time ttt. It is defined for any mmm and any curve, with no hypotheses attached.

Energy. keplerEnergy(k,m,x)(t)=12m∥vel(x)(t)∥2−km∥x(t)∥\mathrm{keplerEnergy}(k,m,x)(t) = \tfrac12 m\lVert\mathrm{vel}(x)(t)\rVert^{2} - \dfrac{km}{\lVert x(t)\rVert}keplerEnergy(k,m,x)(t)=21​m∥vel(x)(t)∥2−∥x(t)∥km​, again defined unconditionally; if x(t)=0x(t)=0x(t)=0 the second term is 000 by the division convention.

Swept area. sweptArea(x,t0,t1)=12∫t0t1∥cross(x(t),vel(x)(t))∥ dt\mathrm{sweptArea}(x,t_0,t_1) = \tfrac12\displaystyle\int_{t_0}^{t_1}\big\lVert \mathrm{cross}\big(x(t),\mathrm{vel}(x)(t)\big)\big\rVert\,dtsweptArea(x,t0​,t1​)=21​∫t0​t1​​​cross(x(t),vel(x)(t))​dt. This is an oriented interval integral: exchanging t0t_0t0​ and t1t_1t1​ negates it. Since the integrand is a norm and so is nonnegative, the value is ≥0\ge0≥0 when t0≤t1t_0\le t_1t0​≤t1​ and ≤0\le0≤0 when t1<t0t_1<t_0t1​<t0​. If the integrand is not integrable over the interval, the integral is 000 by convention.

Ellipse with a focus at the origin. For a set SSS of vectors, IsEllipseWithFocusAtOrigin(S)\mathrm{IsEllipseWithFocusAtOrigin}(S)IsEllipseWithFocusAtOrigin(S) asserts that there exist vectors n,cn,cn,c and a real number aaa with n≠0n\neq0n=0, ⟨n,c⟩=0\langle n,c\rangle=0⟨n,c⟩=0, ∥c∥<2a\lVert c\rVert<2a∥c∥<2a, and

S  =  { y  :  ⟨n,y⟩=0  and  ∥y∥+∥y−c∥=2a }.S \;=\; \big\{\,y \;:\; \langle n,y\rangle = 0 \ \text{ and } \ \lVert y\rVert + \lVert y-c\rVert = 2a \,\big\}.S={y:⟨n,y⟩=0  and  ∥y∥+∥y−c∥=2a}.

The last condition is an equality of sets, not an inclusion: SSS must be exactly that locus, no larger and no smaller. In words: SSS is the set of points of the plane through the origin with normal nnn whose distances to the two points 000 and ccc sum to 2a2a2a, and the second focus ccc is required to lie in that plane. Since ∥c∥≥0\lVert c\rVert\ge0∥c∥≥0, the condition ∥c∥<2a\lVert c\rVert<2a∥c∥<2a forces a>0a>0a>0. The case c=0c=0c=0 is allowed and makes SSS the circle of radius aaa in that plane. The degenerate cases ∥c∥=2a\lVert c\rVert=2a∥c∥=2a (a line segment) and ∥c∥>2a\lVert c\rVert>2a∥c∥>2a (the empty set) are excluded by the strict inequality. Nothing in the predicate refers to any dynamics.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me