feat(ClassicalMechanics): inertia tensor about a point and the parallel-axis theorem - #1475
Conversation
…el-axis theorem Add `RigidBody.inertiaTensorAbout`, the inertia tensor of a rigid body with its moments taken about an arbitrary point, together with * `inertiaTensorAbout_apply`, its entrywise form, * `inertiaTensorAbout_zero`, identifying the tensor about the origin with the existing `inertiaTensor`, * `inertiaTensorAbout_symmetric`, * `inertiaTensorAbout_integrand_split`, splitting the integrand about `p` into the integrand about the centre of mass, terms linear in the centred coordinates and a constant, * `inertiaTensorAbout_eq_centerOfMass_add_pointMass`, the parallel-axis theorem `I(p) = I(c) + M (|c - p|² 1 - (c - p) ⊗ (c - p))`, whose linear terms vanish because the first moment about the centre of mass is zero, and * `inertiaTensor_eq_centerOfMass_add_pointMass`, its specialisation to the origin. The `parallel_axis_theorem` informal lemma (tag LL32-PA) is replaced by the formal result, and the API map records the new requirement. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0195KjrTRRCtXWXubZubRBv4
|
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 |
Adds the inertia tensor of a rigid body about an arbitrary point and proves the
parallel-axis theorem, discharging the
parallel_axis_theoreminformal lemma(tag
LL32-PA, Landau & Lifshitz, Mechanics, §32).Everything lives in
Physlib/ClassicalMechanics/RigidBody/Basic.lean, next toinertiaTensor(+95 / −8 lines, one file, plus the API map).
What is added
RigidBody.inertiaTensorAbout R pprather than about the origin of the reference frameRigidBody.inertiaTensorAbout_apply(i, j)entry as a moment of the mass distribution (rfl)RigidBody.inertiaTensorAbout_zeroinertiaTensorAbout 0 = inertiaTensor, identifying the new definition with the existing oneRigidBody.inertiaTensorAbout_symmetricRigidBody.inertiaTensorAbout_integrand_splitpinto the integrand about the centre of mass, terms linear in the centred coordinatesy − c, and a constantRigidBody.inertiaTensorAbout_eq_centerOfMass_add_pointMassI(p) = I(c) + M (|c − p|² 1 − (c − p) ⊗ (c − p))RigidBody.inertiaTensor_eq_centerOfMass_add_pointMassI(0) = I(c) + M (|c|² 1 − c ⊗ c)The
parallel_axis_theoreminformal lemma is removed (replaced by the formal statement) and theAPI map gains the corresponding requirement.
Reading order
inertiaTensorAboutandinertiaTensorAbout_apply— the definition.inertiaTensorAbout_integrand_split— pure algebra on test functions:y − p = (y − c) + (c − p)expands the integrand into the centred integrand, terms linear in
y − c, and a constant.inertiaTensorAbout_eq_centerOfMass_add_pointMass— applyρ; the linear terms die byrho_coord_sub_centerOfMass(the first moment about the centre of mass vanishes, whence theR.mass ≠ 0hypothesis) and the constant contributesMtimes itself.Two points I would flag
I_{O'} = I_O + M(|a|² 1 − a ⊗ a)for a displacementabetween two arbitrary points; thatholds when
Ois the centre of mass, otherwise first-moment terms survive. The formal theoremtherefore takes the centre of mass as the base point, which is the L&L §32 statement.
inertiaTensoris not redefined asinertiaTensorAbout 0.inertiaTensoris theorigin-based notion already used by
angularMomentumandrotationalKineticEnergy, so I leftit as the primitive and added
inertiaTensorAbout_zero(asimplemma) as the bridge, keepingthe diff to one file. Happy to invert the definitional order if you prefer it the other way.
If the inertia API grows further (principal axes, the spatial tensor
R I Rᵀ), these declarationswould naturally move together into a dedicated
RigidBody/Inertia.lean; that seemed premature forthis PR.
Verification
lake build— full aggregate, 9264 jobs, green;Basic.leanrecompiles from scratch with nowarnings.
lake exe runPhyslibLinters—Linting passed for Physlib.lake exe check_file_imports,lake exe check_dup_tags,lake exe sorry_lint— all pass../scripts/lint-style.sh— exit 0;python scripts/api_map_linter.py --repo .—[ok]forRigidBody/API-map.yaml.#print axiomson all seven new declarations —[propext, Classical.choice, Quot.sound]only.AI disclosure: drafted with Claude Code (see the commit trailer); every statement and proof has
been read and checked by me.