Skip to content

feat(ClassicalMechanics): add rigid-body angular momentum and prove L = Iω#1366

Merged
jstoobysmith merged 2 commits into
leanprover-community:masterfrom
giuseppesorge:rigidbody-angular-momentum
Jul 7, 2026
Merged

feat(ClassicalMechanics): add rigid-body angular momentum and prove L = Iω#1366
jstoobysmith merged 2 commits into
leanprover-community:masterfrom
giuseppesorge:rigidbody-angular-momentum

Conversation

@giuseppesorge

Copy link
Copy Markdown
Contributor

This PR adds the angular momentum of a rigid body and proves the fundamental identity L = I ω, the first step of the Landau–Lifshitz §32 rigid-body dynamics arc (#893).

For a body rotating with angular velocity ω about its reference point, each point at r moves with velocity ω × r, so the angular momentum is L = ∫ r × (ω × r) dm. Expanding the double cross product, r × (ω × r) = |r|² ω − (r · ω) r, shows that L is linear in ω with matrix the (already-formalized) inertia tensor.

Physlib/ClassicalMechanics/RigidBody/AngularMomentum.lean (new)

  • RigidBody.angularMomentum ω — the angular momentum, defined as ρ applied componentwise to the physical integrand r × (ω × r) (mathlib's ⨯₃ on the Space 3 coordinates);
  • angularMomentum_eq_inertiaTensor_mulVecL = inertiaTensor *ᵥ ω.

Physlib/Mathematics/CrossProductMatrix.lean

  • Matrix.cross_cross_self_apply — the general bac−cab expansion [v ⨯₃ (w ⨯₃ v)]ᵢ = |v|² wᵢ − (v · w) vᵢ for v w : Fin 3 → ℝ, a thin componentwise corollary of mathlib's cross_cross_eq_smul_sub_smul'. It is the algebraic core of L = Iω and, being a general cross-product identity with no physics content, lives in the general cross-product file rather than the classical-mechanics one.

Builds only on merged master (RigidBody.inertiaTensor and the ρ mass-distribution API in Basic.lean, plus the cross-product file from #1324/#1363). All declarations reduce to [propext, Classical.choice, Quot.sound].

This is the shared algebraic kernel of the next steps: König's kinetic-energy decomposition T = ½M|V|² + ½ ω · Iω is the same expansion dotted with ω, and Euler's equations consume L = Iω.

Toward #893.

… = Iω

For a body rotating with angular velocity ω about its reference point, each
point at r moves with velocity ω × r, so the angular momentum is
L = ∫ r × (ω × r) dm. Expanding the double cross product
(r × (ω × r) = |r|² ω − (r·ω) r) shows L = I ω:

- RigidBody.angularMomentum ω, defined as the componentwise ρ of r × (ω × r)
- Matrix.cross_cross_self_apply (Mathematics/CrossProductMatrix.lean): the
  general bac−cab expansion v ⨯₃ (w ⨯₃ v) = |v|² w − (v·w) v, kept in the
  general cross-product file rather than the classical-mechanics one
- angularMomentum_eq_inertiaTensor_mulVec: L = inertiaTensor *ᵥ ω

Toward leanprover-community#893.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Thank you for this PR, which will now be reviewed. If submitting to ./Physlib or ./QuantumInfo, please see our review guidelines if you are not familiar with the process. You should expect a back and forth with a reviewer before your PR is merged. See also that link for how to add appropriate labels to your PR. The PR will also go through a number of automated checks. You can learn more about these here, including how to run them locally.

If you are submitting to ./PhyslibAlpha there will be a lighter review process, though your PR must still pass the automated checks.

If you want to bring attention to this PR, please write a message on this thread of the Lean Zulip.

Important: If a reviewer adds an awaiting-author label to your PR, once you have addressed the review comments, please remove that label by adding a comment with -awaiting-author. This helps us keep track of reviews.

/-- The component form of the triple cross product `v ⨯₃ (w ⨯₃ v)`: by the `bac−cab` identity its
`i`-th entry is `|v|² wᵢ − (v · w) vᵢ`, written with the explicit component sums `∑ k, (v k)²` and
`∑ j, v j * w j`. -/
lemma cross_cross_self_apply (v w : Fin 3 → ℝ) (i : Fin 3) :

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 think either we:

  1. Move this lemma to a CrossProduct file,
  2. or, rename this file to CrossProduct.

@jstoobysmith jstoobysmith added the awaiting-author A reviewer has asked the author a question or requested changes label Jul 4, 2026
…uct file

Address review: keep CrossProductMatrix.lean focused on the hat map, and put
the general triple-cross-product identity in its own file
Physlib/Mathematics/CrossProduct.lean. AngularMomentum.lean now imports
Physlib.Mathematics.CrossProduct.

Co-authored-by: Claude Opus 4.8 <no-reply+claude-opus-4-8@anthropic.com>
@giuseppesorge

Copy link
Copy Markdown
Contributor Author

Thanks! Went with option 1 — moved cross_cross_self_apply into a new Physlib/Mathematics/CrossProduct.lean, keeping CrossProductMatrix.lean for the hat map, and pointed AngularMomentum.lean at the new file.

@giuseppesorge

Copy link
Copy Markdown
Contributor Author

-awaiting-author

@github-actions github-actions Bot removed the awaiting-author A reviewer has asked the author a question or requested changes label Jul 6, 2026

@jstoobysmith jstoobysmith left a comment

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.

Looks good - approved.

@jstoobysmith jstoobysmith added the ready-to-merge This PR is approved and will be merged shortly label Jul 7, 2026
@jstoobysmith jstoobysmith merged commit 704523e into leanprover-community:master Jul 7, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR is approved and will be merged shortly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants