Skip to content

Add basic formalisation of the free particle in classical mechanics#1081

Open
Pranav-Magdum wants to merge 3 commits intoleanprover-community:masterfrom
Pranav-Magdum:master
Open

Add basic formalisation of the free particle in classical mechanics#1081
Pranav-Magdum wants to merge 3 commits intoleanprover-community:masterfrom
Pranav-Magdum:master

Conversation

@Pranav-Magdum
Copy link
Copy Markdown

This PR adds a simple formalisation of the free particle: a particle of mass m with no external forces acting on it.

The goal is to capture the standard first-step reasoning from classical mechanics in Lean. Starting from Newton’s second law (m * q'' = 0), we show:

acceleration is zero,
velocity is constant,
kinetic energy is conserved.

The development is intentionally minimal and 1-dimensional (ℝ → ℝ) to keep things easy to follow. The harder analysis step (showing zero acceleration implies constant velocity) is currently isolated in a lemma, so the overall structure is clear and can be extended later.

This file introduces the FreeParticle module in classical mechanics, detailing the properties and behaviors of a free particle, including Newton's second law, constant velocity, and energy conservation.
Copy link
Copy Markdown
Member

@jstoobysmith jstoobysmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments.

@@ -0,0 +1,125 @@
/-
Copyright (c) 2025 Pranav Magdum. All rights reserved.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2026

- Goldstein, *Classical Mechanics*

-/
import Mathlib.Data.Real.Basic
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should go before the doc-string. Also we are now using the module system (see another Physlib file as an example of how to import within the module system).


TODO "Make the documantation more descriptive"
TODO "Prove momentum conservation"
TODO "Prove the velocity_const_of_zero_acc lemma"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could make these more descriptive.

deriv q t

noncomputable
def kinetic_energy (s : FreeParticle) (q : Trajectory) (t : Time) : ℝ :=
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kineticEnergy (no underscores in names of definitions)


namespace FreeParticle

abbrev Time := ℝ
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would get this from SpaceTime.Time.Basic rather than defining it again.

exact (mul_eq_zero.mp h1).resolve_left h₀

-- Step 2: velocity is constant
lemma velocity_const_of_zero_acc
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is not yet proved it will need the @[sorryful] attribute. May need an import to get this to work.

sorry

-- Step 3: Energy conservation
theorem Energy_is_Conserved
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kineticEnergy_conserved would be a better name I think.


-- get constant velocity
rcases velocity_const_of_zero_acc q h_acc hcont with ⟨v₀, hv⟩

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we remove these new lines in the proof?

## iv. References

- Landau & Lifshitz, *Mechanics*
- Goldstein, *Classical Mechanics*
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we either 1) remove these references, or 2) Add specific page numbers.


In this file, we work in a simple 1D coordinate system where position and velocity are functions
of time with values in `ℝ`. This keeps things easy to reason about. A more complete treatment would
use manifolds and tangent bundles, but that’s overkill here.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would remove the but that's overkill here.

Updated copyright year from 2025 to 2026 and modified text for clarity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants