Imports
/-
Copyright (c) 2026 Giuseppe Sorge. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Giuseppe Sorge
-/
module
public import Physlib.ClassicalMechanics.RigidBody.AngularMomentum
public import Physlib.ClassicalMechanics.RigidBody.AngularVelocity
public import Physlib.Mathematics.OrthogonalMatrixKinetic energy of a rigid body
For a rigid body rotating with angular velocity ω about its reference point the point at
position r has velocity ω × r, so its kinetic energy is T = ½ ∫ |ω × r|² dm. Since
|ω × r|² = ω · (r × (ω × r)) and the angular momentum is L = ∫ r × (ω × r) dm = I ω, the
kinetic energy is the quadratic form T = ½ ω · L = ½ ω · I ω in the inertia tensor.
For a rigid body in motion the total kinetic energy is the mass integral of half the squared
speed of its points, T = ½ ∫ ⟪v, v⟫ dm. König's theorem splits it into the kinetic energy of
the centre of mass plus the rotational energy about the centre of mass,
T = ½ M ⟪V, V⟫ + ½ ∫ |Ṙ (y − c)|² dm: the cross term vanishes because the first moment of the
mass distribution about its centre of mass is zero. In three dimensions the rotational term is
½ ∫ |ω × r|² dm, with ω the angular velocity vector and r the position of the body point
relative to the centre of mass.
The total kinetic energy is defined with the point velocity taken in the closed form
Ṙ(t) (y − c) + V(t) (velocityClosedForm), which is polynomial in the body point and hence
smooth for any motion; for differentiable motions it agrees with the honest point velocity
∂ₜ (displacement · y), recovering T = ½ ∫ ⟪v, v⟫ dm (kineticEnergy_eq_integral_velocity).
References
Landau and Lifshitz, Mechanics, Section 32.
@[expose] public sectionattribute [local instance] Matrix.linftyOpNormedAddCommGroup Matrix.linftyOpNormedSpace
Matrix.linftyOpNormedRing Matrix.linftyOpNormedAlgebra
The rotational kinetic energy is half the contraction of the angular velocity with the angular
momentum: T = ½ ω · L.
All goals completed! 🐙
The rotational kinetic energy equals the mass integral of the local rotational speed squared:
T = ½ ∫ |ω × r|² dm.
theorem rotationalKineticEnergy_eq_integral (R : RigidBody 3) (ω : Fin 3 → ℝ) :
R.rotationalKineticEnergy ω
= (1 / (2 : ℝ)) * R.ρ ⟨fun x => (ω ⨯₃ (x : Fin 3 → ℝ)) ⬝ᵥ (ω ⨯₃ (x : Fin 3 → ℝ)),
ContDiff.contMDiff <| (contDiff_cross_dotProduct_cross ω).comp
(contDiff_pi.mpr fun i => Space.eval_contDiff i)⟩ := by R:RigidBody 3ω:Fin 3 → ℝ⊢ R.rotationalKineticEnergy ω = 1 / 2 * R.ρ ⟨fun x => (crossProduct ω) (x.val 3) ⬝ᵥ (crossProduct ω) (x.val 3), ⋯⟩
rw [rotationalKineticEnergy_eq_angularMomentum R:RigidBody 3ω:Fin 3 → ℝ⊢ 1 / 2 * ω ⬝ᵥ R.angularMomentum ω = 1 / 2 * R.ρ ⟨fun x => (crossProduct ω) (x.val 3) ⬝ᵥ (crossProduct ω) (x.val 3), ⋯⟩ R:RigidBody 3ω:Fin 3 → ℝ⊢ 1 / 2 * ω ⬝ᵥ R.angularMomentum ω = 1 / 2 * R.ρ ⟨fun x => (crossProduct ω) (x.val 3) ⬝ᵥ (crossProduct ω) (x.val 3), ⋯⟩] R:RigidBody 3ω:Fin 3 → ℝ⊢ 1 / 2 * ω ⬝ᵥ R.angularMomentum ω = 1 / 2 * R.ρ ⟨fun x => (crossProduct ω) (x.val 3) ⬝ᵥ (crossProduct ω) (x.val 3), ⋯⟩
congr 1 e_a R:RigidBody 3ω:Fin 3 → ℝ⊢ ω ⬝ᵥ R.angularMomentum ω = R.ρ ⟨fun x => (crossProduct ω) (x.val 3) ⬝ᵥ (crossProduct ω) (x.val 3), ⋯⟩
simp_rw [ e_a R:RigidBody 3ω:Fin 3 → ℝ⊢ ω ⬝ᵥ R.angularMomentum ω = R.ρ ⟨fun x => (crossProduct ω) (x.val 3) ⬝ᵥ (crossProduct ω) (x.val 3), ⋯⟩dotProduct, e_a R:RigidBody 3ω:Fin 3 → ℝ⊢ ∑ i, ω i * R.angularMomentum ω i = R.ρ ⟨fun x => ∑ i, (crossProduct ω) (x.val 3) i * (crossProduct ω) (x.val 3) i, ⋯⟩ angularMomentum, e_a R:RigidBody 3ω:Fin 3 → ℝ⊢ ∑ x, ω x * R.ρ ⟨fun x_1 => (crossProduct (x_1.val 3)) ((crossProduct ω) (x_1.val 3)) x, ⋯⟩ =
R.ρ ⟨fun x => ∑ i, (crossProduct ω) (x.val 3) i * (crossProduct ω) (x.val 3) i, ⋯⟩ ← smul_eq_mul, e_a R:RigidBody 3ω:Fin 3 → ℝ⊢ ∑ x, ω x • R.ρ ⟨fun x_1 => (crossProduct (x_1.val 3)) ((crossProduct ω) (x_1.val 3)) x, ⋯⟩ =
R.ρ ⟨fun x => ∑ x_1, (crossProduct ω) (x.val 3) x_1 • (crossProduct ω) (x.val 3) x_1, ⋯⟩ ← map_smul, e_a R:RigidBody 3ω:Fin 3 → ℝ⊢ ∑ x, R.ρ (ω x • ⟨fun x_1 => (crossProduct (x_1.val 3)) ((crossProduct ω) (x_1.val 3)) x, ⋯⟩) =
R.ρ ⟨fun x => ∑ x_1, (crossProduct ω) (x.val 3) x_1 • (crossProduct ω) (x.val 3) x_1, ⋯⟩ ← map_sum e_a R:RigidBody 3ω:Fin 3 → ℝ⊢ R.ρ (∑ x, ω x • ⟨fun x_1 => (crossProduct (x_1.val 3)) ((crossProduct ω) (x_1.val 3)) x, ⋯⟩) =
R.ρ ⟨fun x => ∑ x_1, (crossProduct ω) (x.val 3) x_1 • (crossProduct ω) (x.val 3) x_1, ⋯⟩]
congr 1 e_a.e_6 R:RigidBody 3ω:Fin 3 → ℝ⊢ ∑ x, ω x • ⟨fun x_1 => (crossProduct (x_1.val 3)) ((crossProduct ω) (x_1.val 3)) x, ⋯⟩ =
⟨fun x => ∑ x_1, (crossProduct ω) (x.val 3) x_1 • (crossProduct ω) (x.val 3) x_1, ⋯⟩
ext x e_a.e_6 R:RigidBody 3ω:Fin 3 → ℝx:Space⊢ (∑ x, ω x • ⟨fun x_1 => (crossProduct (x_1.val 3)) ((crossProduct ω) (x_1.val 3)) x, ⋯⟩) x =
⟨fun x => ∑ x_1, (crossProduct ω) (x.val 3) x_1 • (crossProduct ω) (x.val 3) x_1, ⋯⟩ x
rw [← ContMDiffMap.coeFnAddMonoidHom_apply, e_a.e_6 R:RigidBody 3ω:Fin 3 → ℝx:Space⊢ ContMDiffMap.coeFnAddMonoidHom (∑ x, ω x • ⟨fun x_1 => (crossProduct (x_1.val 3)) ((crossProduct ω) (x_1.val 3)) x, ⋯⟩)
x =
⟨fun x => ∑ x_1, (crossProduct ω) (x.val 3) x_1 • (crossProduct ω) (x.val 3) x_1, ⋯⟩ x e_a.e_6 R:RigidBody 3ω:Fin 3 → ℝx:Space⊢ ∑ c, ContMDiffMap.coeFnAddMonoidHom (ω c • ⟨fun x => (crossProduct (x.val 3)) ((crossProduct ω) (x.val 3)) c, ⋯⟩) x =
⟨fun x => ∑ x_1, (crossProduct ω) (x.val 3) x_1 • (crossProduct ω) (x.val 3) x_1, ⋯⟩ x map_sum, e_a.e_6 R:RigidBody 3ω:Fin 3 → ℝx:Space⊢ (∑ x,
ContMDiffMap.coeFnAddMonoidHom
(ω x • ⟨fun x_1 => (crossProduct (x_1.val 3)) ((crossProduct ω) (x_1.val 3)) x, ⋯⟩))
x =
⟨fun x => ∑ x_1, (crossProduct ω) (x.val 3) x_1 • (crossProduct ω) (x.val 3) x_1, ⋯⟩ xe_a.e_6 R:RigidBody 3ω:Fin 3 → ℝx:Space⊢ ∑ c, ContMDiffMap.coeFnAddMonoidHom (ω c • ⟨fun x => (crossProduct (x.val 3)) ((crossProduct ω) (x.val 3)) c, ⋯⟩) x =
⟨fun x => ∑ x_1, (crossProduct ω) (x.val 3) x_1 • (crossProduct ω) (x.val 3) x_1, ⋯⟩ x Finset.sum_apply e_a.e_6 R:RigidBody 3ω:Fin 3 → ℝx:Space⊢ ∑ c, ContMDiffMap.coeFnAddMonoidHom (ω c • ⟨fun x => (crossProduct (x.val 3)) ((crossProduct ω) (x.val 3)) c, ⋯⟩) x =
⟨fun x => ∑ x_1, (crossProduct ω) (x.val 3) x_1 • (crossProduct ω) (x.val 3) x_1, ⋯⟩ xe_a.e_6 R:RigidBody 3ω:Fin 3 → ℝx:Space⊢ ∑ c, ContMDiffMap.coeFnAddMonoidHom (ω c • ⟨fun x => (crossProduct (x.val 3)) ((crossProduct ω) (x.val 3)) c, ⋯⟩) x =
⟨fun x => ∑ x_1, (crossProduct ω) (x.val 3) x_1 • (crossProduct ω) (x.val 3) x_1, ⋯⟩ x]e_a.e_6 R:RigidBody 3ω:Fin 3 → ℝx:Space⊢ ∑ c, ContMDiffMap.coeFnAddMonoidHom (ω c • ⟨fun x => (crossProduct (x.val 3)) ((crossProduct ω) (x.val 3)) c, ⋯⟩) x =
⟨fun x => ∑ x_1, (crossProduct ω) (x.val 3) x_1 • (crossProduct ω) (x.val 3) x_1, ⋯⟩ x
simp only [ContMDiffMap.coeFnAddMonoidHom_apply, ContMDiffMap.coe_smul, Pi.smul_apply,
ContMDiffMap.coeFn_mk, smul_eq_mul] e_a.e_6 R:RigidBody 3ω:Fin 3 → ℝx:Space⊢ ∑ x_1, ω x_1 * (crossProduct (x.val 3)) ((crossProduct ω) (x.val 3)) x_1 =
∑ x_1, (crossProduct ω) (x.val 3) x_1 * (crossProduct ω) (x.val 3) x_1
exact dotProduct_cross_cross_self (x : Fin 3 → ℝ) ω All goals completed! 🐙
For a differentiable motion the integrand of kineticEnergy is the squared speed of the
honest point velocity: T = ½ ∫ ⟪v, v⟫ dm with v = ∂ₜ (displacement · y).
lemma kineticEnergy_eq_integral_velocity {d : ℕ} (M : RigidBodyMotion d) (t : Time)
(hR : Differentiable ℝ (fun s => (M.orientation s).1))
(hX : Differentiable ℝ M.comTrajectory) :
M.kineticEnergy t = (1 / (2 : ℝ)) * M.ρ (cmap
(fun y => (⟪M.velocity y t, M.velocity y t⟫_ℝ))
(by d:ℕM:RigidBodyMotion dt:TimehR:Differentiable ℝ fun s => ↑(M.orientation s)hX:Differentiable ℝ M.comTrajectory⊢ ContDiff ℝ ⊤ fun y => ⟪M.velocity y t, M.velocity y t⟫_ℝ
simp only [← M.velocityClosedForm_eq_velocity t hR hX] d:ℕM:RigidBodyMotion dt:TimehR:Differentiable ℝ fun s => ↑(M.orientation s)hX:Differentiable ℝ M.comTrajectory⊢ ContDiff ℝ ⊤ fun y => ⟪M.velocityClosedForm t y, M.velocityClosedForm t y⟫_ℝ
exact M.contDiff_velocityClosedForm_inner t All goals completed! 🐙)) := by d:ℕM:RigidBodyMotion dt:TimehR:Differentiable ℝ fun s => ↑(M.orientation s)hX:Differentiable ℝ M.comTrajectory⊢ M.kineticEnergy t = 1 / 2 * M.ρ (cmap (fun y => ⟪M.velocity y t, M.velocity y t⟫_ℝ) ⋯)
rw [kineticEnergy d:ℕM:RigidBodyMotion dt:TimehR:Differentiable ℝ fun s => ↑(M.orientation s)hX:Differentiable ℝ M.comTrajectory⊢ 1 / 2 * M.ρ (cmap (fun y => ⟪M.velocityClosedForm t y, M.velocityClosedForm t y⟫_ℝ) ⋯) =
1 / 2 * M.ρ (cmap (fun y => ⟪M.velocity y t, M.velocity y t⟫_ℝ) ⋯) d:ℕM:RigidBodyMotion dt:TimehR:Differentiable ℝ fun s => ↑(M.orientation s)hX:Differentiable ℝ M.comTrajectory⊢ 1 / 2 * M.ρ (cmap (fun y => ⟪M.velocityClosedForm t y, M.velocityClosedForm t y⟫_ℝ) ⋯) =
1 / 2 * M.ρ (cmap (fun y => ⟪M.velocity y t, M.velocity y t⟫_ℝ) ⋯)] d:ℕM:RigidBodyMotion dt:TimehR:Differentiable ℝ fun s => ↑(M.orientation s)hX:Differentiable ℝ M.comTrajectory⊢ 1 / 2 * M.ρ (cmap (fun y => ⟪M.velocityClosedForm t y, M.velocityClosedForm t y⟫_ℝ) ⋯) =
1 / 2 * M.ρ (cmap (fun y => ⟪M.velocity y t, M.velocity y t⟫_ℝ) ⋯)
congr 2 e_a.e_6 d:ℕM:RigidBodyMotion dt:TimehR:Differentiable ℝ fun s => ↑(M.orientation s)hX:Differentiable ℝ M.comTrajectory⊢ cmap (fun y => ⟪M.velocityClosedForm t y, M.velocityClosedForm t y⟫_ℝ) ⋯ =
cmap (fun y => ⟪M.velocity y t, M.velocity y t⟫_ℝ) ⋯
ext y e_a.e_6 d:ℕM:RigidBodyMotion dt:TimehR:Differentiable ℝ fun s => ↑(M.orientation s)hX:Differentiable ℝ M.comTrajectoryy:Space d⊢ (cmap (fun y => ⟪M.velocityClosedForm t y, M.velocityClosedForm t y⟫_ℝ) ⋯) y =
(cmap (fun y => ⟪M.velocity y t, M.velocity y t⟫_ℝ) ⋯) y
simp only [cmap_apply, M.velocityClosedForm_eq_velocity t hR hX] All goals completed! 🐙
The squared-speed integrand of kineticEnergy splits into the squared rotational speed
|Ṙ (y − c)|², a term linear in the body-frame coordinate y − c, and the constant squared
centre-of-mass speed ⟪V, V⟫.
lemma kineticEnergy_integrand_split {d : ℕ} (M : RigidBodyMotion d) (t : Time) :
cmap (fun y => (⟪M.velocityClosedForm t y, M.velocityClosedForm t y⟫_ℝ))
(M.contDiff_velocityClosedForm_inner t)
= cmap (fun y =>
(∂ₜ (fun s => (M.orientation s).1) t *ᵥ fun j => y j - M.centerOfMass j) ⬝ᵥ
(∂ₜ (fun s => (M.orientation s).1) t *ᵥ fun j => y j - M.centerOfMass j))
(by d:ℕM:RigidBodyMotion dt:Time⊢ ContDiff ℝ ⊤ fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j simp only [dotProduct, Matrix.mulVec] d:ℕM:RigidBodyMotion dt:Time⊢ ContDiff ℝ ⊤ fun y =>
∑ x,
(∑ x_1, ∂ₜ (fun s => ↑(M.orientation s)) t x x_1 * (y.val x_1 - M.centerOfMass.val x_1)) *
∑ x_1, ∂ₜ (fun s => ↑(M.orientation s)) t x x_1 * (y.val x_1 - M.centerOfMass.val x_1); fun_prop All goals completed! 🐙)
+ ∑ j, (2 * (((M.centerOfMassVelocity t : Fin d → ℝ) ᵥ*
∂ₜ (fun s => (M.orientation s).1) t) j)) •
cmap (fun y => y j - M.centerOfMass j) (by d:ℕM:RigidBodyMotion dt:Timej:Fin d⊢ ContDiff ℝ ⊤ fun y => y.val j - M.centerOfMass.val j fun_prop All goals completed! 🐙)
+ (⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ) •
(1 : C^⊤⟮𝓘(ℝ, Space d), Space d; 𝓘(ℝ, ℝ), ℝ⟯) := by d:ℕM:RigidBodyMotion dt:Time⊢ cmap (fun y => ⟪M.velocityClosedForm t y, M.velocityClosedForm t y⟫_ℝ) ⋯ =
cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯ +
∑ j,
(2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) j) •
cmap (fun y => y.val j - M.centerOfMass.val j) ⋯ +
⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ • 1
ext y d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ (cmap (fun y => ⟪M.velocityClosedForm t y, M.velocityClosedForm t y⟫_ℝ) ⋯) y =
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯ +
∑ j,
(2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) j) •
cmap (fun y => y.val j - M.centerOfMass.val j) ⋯ +
⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ • 1)
y
simp only [cmap_apply, ContMDiffMap.coe_add, ContMDiffMap.coe_smul, ContMDiffMap.coe_one,
Pi.add_apply, Pi.smul_apply, Pi.one_apply, smul_eq_mul, mul_one] d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ ⟪M.velocityClosedForm t y, M.velocityClosedForm t y⟫_ℝ =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
(∑ j,
(2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) j) •
cmap (fun y => y.val j - M.centerOfMass.val j) ⋯)
y +
⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ
rw [← ContMDiffMap.coeFnAddMonoidHom_apply, d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ ⟪M.velocityClosedForm t y, M.velocityClosedForm t y⟫_ℝ =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
ContMDiffMap.coeFnAddMonoidHom
(∑ j,
(2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) j) •
cmap (fun y => y.val j - M.centerOfMass.val j) ⋯)
y +
⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ ⟪M.velocityClosedForm t y, M.velocityClosedForm t y⟫_ℝ =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
∑ c,
ContMDiffMap.coeFnAddMonoidHom
((2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) c) •
cmap (fun y => y.val c - M.centerOfMass.val c) ⋯)
y +
⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ map_sum, d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ ⟪M.velocityClosedForm t y, M.velocityClosedForm t y⟫_ℝ =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
(∑ x,
ContMDiffMap.coeFnAddMonoidHom
((2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x) •
cmap (fun y => y.val x - M.centerOfMass.val x) ⋯))
y +
⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ ⟪M.velocityClosedForm t y, M.velocityClosedForm t y⟫_ℝ =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
∑ c,
ContMDiffMap.coeFnAddMonoidHom
((2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) c) •
cmap (fun y => y.val c - M.centerOfMass.val c) ⋯)
y +
⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ Finset.sum_apply d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ ⟪M.velocityClosedForm t y, M.velocityClosedForm t y⟫_ℝ =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
∑ c,
ContMDiffMap.coeFnAddMonoidHom
((2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) c) •
cmap (fun y => y.val c - M.centerOfMass.val c) ⋯)
y +
⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ ⟪M.velocityClosedForm t y, M.velocityClosedForm t y⟫_ℝ =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
∑ c,
ContMDiffMap.coeFnAddMonoidHom
((2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) c) •
cmap (fun y => y.val c - M.centerOfMass.val c) ⋯)
y +
⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ] d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ ⟪M.velocityClosedForm t y, M.velocityClosedForm t y⟫_ℝ =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
∑ c,
ContMDiffMap.coeFnAddMonoidHom
((2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) c) •
cmap (fun y => y.val c - M.centerOfMass.val c) ⋯)
y +
⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ
simp only [ContMDiffMap.coeFnAddMonoidHom_apply, ContMDiffMap.coe_smul, Pi.smul_apply,
cmap_apply, smul_eq_mul] d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ ⟪M.velocityClosedForm t y, M.velocityClosedForm t y⟫_ℝ =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
∑ x,
2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x *
(y.val x - M.centerOfMass.val x) +
⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ
rw [show (⟪M.velocityClosedForm t y, M.velocityClosedForm t y⟫_ℝ)
= (M.velocityClosedForm t y : Fin d → ℝ) ⬝ᵥ (M.velocityClosedForm t y : Fin d → ℝ) from
Space.inner_eq_sum _ _, d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ (M.velocityClosedForm t y).val ⬝ᵥ (M.velocityClosedForm t y).val =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
∑ x,
2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x *
(y.val x - M.centerOfMass.val x) +
⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ (((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t ⬝ᵥ fun j => y.val j - M.centerOfMass.val j) +
(((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t ⬝ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val) =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
∑ x,
2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x *
(y.val x - M.centerOfMass.val x) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val
velocityClosedForm_val, d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ ((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) + (M.centerOfMassVelocity t).val) ⬝ᵥ
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) + (M.centerOfMassVelocity t).val) =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
∑ x,
2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x *
(y.val x - M.centerOfMass.val x) +
⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ (((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t ⬝ᵥ fun j => y.val j - M.centerOfMass.val j) +
(((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t ⬝ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val) =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
∑ x,
2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x *
(y.val x - M.centerOfMass.val x) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val
show (⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ)
= (M.centerOfMassVelocity t : Fin d → ℝ) ⬝ᵥ (M.centerOfMassVelocity t : Fin d → ℝ) from
Space.inner_eq_sum _ _, d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ ((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) + (M.centerOfMassVelocity t).val) ⬝ᵥ
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) + (M.centerOfMassVelocity t).val) =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
∑ x,
2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x *
(y.val x - M.centerOfMass.val x) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ (((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t ⬝ᵥ fun j => y.val j - M.centerOfMass.val j) +
(((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t ⬝ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val) =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
∑ x,
2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x *
(y.val x - M.centerOfMass.val x) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val
add_dotProduct, d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ (∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val) +
(M.centerOfMassVelocity t).val ⬝ᵥ
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val) =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
∑ x,
2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x *
(y.val x - M.centerOfMass.val x) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ (((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t ⬝ᵥ fun j => y.val j - M.centerOfMass.val j) +
(((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t ⬝ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val) =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
∑ x,
2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x *
(y.val x - M.centerOfMass.val x) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val dotProduct_add, d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ ((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
(M.centerOfMassVelocity t).val +
(M.centerOfMassVelocity t).val ⬝ᵥ
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val) =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
∑ x,
2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x *
(y.val x - M.centerOfMass.val x) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ (((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t ⬝ᵥ fun j => y.val j - M.centerOfMass.val j) +
(((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t ⬝ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val) =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
∑ x,
2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x *
(y.val x - M.centerOfMass.val x) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val dotProduct_add, d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ ((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
(M.centerOfMassVelocity t).val +
(((M.centerOfMassVelocity t).val ⬝ᵥ ∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val) =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
∑ x,
2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x *
(y.val x - M.centerOfMass.val x) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ (((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t ⬝ᵥ fun j => y.val j - M.centerOfMass.val j) +
(((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t ⬝ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val) =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
∑ x,
2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x *
(y.val x - M.centerOfMass.val x) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val
dotProduct_comm (∂ₜ (fun s => (M.orientation s).1) t *ᵥ fun j => y j - M.centerOfMass j)
(M.centerOfMassVelocity t : Fin d → ℝ), d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ (((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val ⬝ᵥ ∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
(((M.centerOfMassVelocity t).val ⬝ᵥ ∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val) =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
∑ x,
2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x *
(y.val x - M.centerOfMass.val x) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ (((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t ⬝ᵥ fun j => y.val j - M.centerOfMass.val j) +
(((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t ⬝ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val) =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
∑ x,
2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x *
(y.val x - M.centerOfMass.val x) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val
dotProduct_mulVec (M.centerOfMassVelocity t : Fin d → ℝ)
(∂ₜ (fun s => (M.orientation s).1) t) (fun j => y j - M.centerOfMass j) d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ (((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t ⬝ᵥ fun j => y.val j - M.centerOfMass.val j) +
(((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t ⬝ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val) =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
∑ x,
2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x *
(y.val x - M.centerOfMass.val x) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ (((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t ⬝ᵥ fun j => y.val j - M.centerOfMass.val j) +
(((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t ⬝ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val) =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
∑ x,
2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x *
(y.val x - M.centerOfMass.val x) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val] d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ (((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t ⬝ᵥ fun j => y.val j - M.centerOfMass.val j) +
(((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t ⬝ᵥ fun j => y.val j - M.centerOfMass.val j) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val) =
((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) +
∑ x,
2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x *
(y.val x - M.centerOfMass.val x) +
(M.centerOfMassVelocity t).val ⬝ᵥ (M.centerOfMassVelocity t).val
simp only [dotProduct, two_mul, add_mul, Finset.sum_add_distrib] d:ℕM:RigidBodyMotion dt:Timey:Space d⊢ ∑ i,
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) i *
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) i +
∑ x, ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x * (y.val x - M.centerOfMass.val x) +
(∑ x, ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x * (y.val x - M.centerOfMass.val x) +
∑ i, (M.centerOfMassVelocity t).val i * (M.centerOfMassVelocity t).val i) =
∑ i,
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) i *
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) i +
(∑ x,
((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x * (y.val x - M.centerOfMass.val x) +
∑ x,
((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x * (y.val x - M.centerOfMass.val x)) +
∑ i, (M.centerOfMassVelocity t).val i * (M.centerOfMassVelocity t).val i
ring All goals completed! 🐙
König's theorem, general form: the total kinetic energy of a rigid body in motion splits
into the kinetic energy of the centre of mass plus the rotational energy about the centre of
mass, T = ½ M ⟪V, V⟫ + ½ ∫ |Ṙ (y − c)|² dm.
theorem kineticEnergy_eq_translational_add_rotational {d : ℕ} (M : RigidBodyMotion d) (t : Time)
(h : M.mass ≠ 0) :
M.kineticEnergy t
= (1 / (2 : ℝ)) * M.mass * (⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ)
+ (1 / (2 : ℝ)) * M.ρ (cmap (fun y =>
(∂ₜ (fun s => (M.orientation s).1) t *ᵥ fun j => y j - M.centerOfMass j) ⬝ᵥ
(∂ₜ (fun s => (M.orientation s).1) t *ᵥ fun j => y j - M.centerOfMass j))
(by d:ℕM:RigidBodyMotion dt:Timeh:M.mass ≠ 0⊢ ContDiff ℝ ⊤ fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j simp only [dotProduct, Matrix.mulVec] d:ℕM:RigidBodyMotion dt:Timeh:M.mass ≠ 0⊢ ContDiff ℝ ⊤ fun y =>
∑ x,
(∑ x_1, ∂ₜ (fun s => ↑(M.orientation s)) t x x_1 * (y.val x_1 - M.centerOfMass.val x_1)) *
∑ x_1, ∂ₜ (fun s => ↑(M.orientation s)) t x x_1 * (y.val x_1 - M.centerOfMass.val x_1); fun_prop All goals completed! 🐙)) := by d:ℕM:RigidBodyMotion dt:Timeh:M.mass ≠ 0⊢ M.kineticEnergy t =
1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯)
rw [kineticEnergy, d:ℕM:RigidBodyMotion dt:Timeh:M.mass ≠ 0⊢ 1 / 2 * M.ρ (cmap (fun y => ⟪M.velocityClosedForm t y, M.velocityClosedForm t y⟫_ℝ) ⋯) =
1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯) d:ℕM:RigidBodyMotion dt:Timeh:M.mass ≠ 0⊢ 1 / 2 *
(M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯) +
∑ x,
M.ρ
((2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x) •
cmap (fun y => y.val x - M.centerOfMass.val x) ⋯) +
M.ρ (⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ • 1)) =
1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯) kineticEnergy_integrand_split, d:ℕM:RigidBodyMotion dt:Timeh:M.mass ≠ 0⊢ 1 / 2 *
M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯ +
∑ j,
(2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) j) •
cmap (fun y => y.val j - M.centerOfMass.val j) ⋯ +
⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ • 1) =
1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯) d:ℕM:RigidBodyMotion dt:Timeh:M.mass ≠ 0⊢ 1 / 2 *
(M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯) +
∑ x,
M.ρ
((2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x) •
cmap (fun y => y.val x - M.centerOfMass.val x) ⋯) +
M.ρ (⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ • 1)) =
1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯) map_add, d:ℕM:RigidBodyMotion dt:Timeh:M.mass ≠ 0⊢ 1 / 2 *
(M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯ +
∑ j,
(2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) j) •
cmap (fun y => y.val j - M.centerOfMass.val j) ⋯) +
M.ρ (⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ • 1)) =
1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯) d:ℕM:RigidBodyMotion dt:Timeh:M.mass ≠ 0⊢ 1 / 2 *
(M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯) +
∑ x,
M.ρ
((2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x) •
cmap (fun y => y.val x - M.centerOfMass.val x) ⋯) +
M.ρ (⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ • 1)) =
1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯) map_add, d:ℕM:RigidBodyMotion dt:Timeh:M.mass ≠ 0⊢ 1 / 2 *
(M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯) +
M.ρ
(∑ j,
(2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) j) •
cmap (fun y => y.val j - M.centerOfMass.val j) ⋯) +
M.ρ (⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ • 1)) =
1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯) d:ℕM:RigidBodyMotion dt:Timeh:M.mass ≠ 0⊢ 1 / 2 *
(M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯) +
∑ x,
M.ρ
((2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x) •
cmap (fun y => y.val x - M.centerOfMass.val x) ⋯) +
M.ρ (⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ • 1)) =
1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯) map_sum d:ℕM:RigidBodyMotion dt:Timeh:M.mass ≠ 0⊢ 1 / 2 *
(M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯) +
∑ x,
M.ρ
((2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x) •
cmap (fun y => y.val x - M.centerOfMass.val x) ⋯) +
M.ρ (⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ • 1)) =
1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯) d:ℕM:RigidBodyMotion dt:Timeh:M.mass ≠ 0⊢ 1 / 2 *
(M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯) +
∑ x,
M.ρ
((2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x) •
cmap (fun y => y.val x - M.centerOfMass.val x) ⋯) +
M.ρ (⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ • 1)) =
1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯)] d:ℕM:RigidBodyMotion dt:Timeh:M.mass ≠ 0⊢ 1 / 2 *
(M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯) +
∑ x,
M.ρ
((2 * ((M.centerOfMassVelocity t).val ᵥ* ∂ₜ (fun s => ↑(M.orientation s)) t) x) •
cmap (fun y => y.val x - M.centerOfMass.val x) ⋯) +
M.ρ (⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ • 1)) =
1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯)
simp only [map_smul, M.rho_coord_sub_centerOfMass h, smul_eq_mul, mul_zero,
Finset.sum_const_zero, add_zero, M.rho_one] d:ℕM:RigidBodyMotion dt:Timeh:M.mass ≠ 0⊢ 1 / 2 *
(M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯) +
⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ * M.mass) =
1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val j - M.centerOfMass.val j)
⋯)
ring All goals completed! 🐙
König's theorem in three dimensions: the total kinetic energy of a rigid body in motion
splits as T = ½ M ⟪V, V⟫ + ½ ∫ |ω × r|² dm, with ω the angular velocity vector and
r = displacement − comTrajectory the position of the body point relative to the centre of
mass.
theorem kineticEnergy_eq_translational_add_angularVelocity (M : RigidBodyMotion 3) (t : Time)
(h : M.mass ≠ 0) (hR : DifferentiableAt ℝ (fun s => (M.orientation s).1) t) :
M.kineticEnergy t
= (1 / (2 : ℝ)) * M.mass * (⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ)
+ (1 / (2 : ℝ)) * M.ρ (cmap (fun y =>
(M.angularVelocity t ⨯₃ fun j => M.displacement t y j - M.comTrajectory t j) ⬝ᵥ
(M.angularVelocity t ⨯₃ fun j => M.displacement t y j - M.comTrajectory t j))
(by M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) t⊢ ContDiff ℝ ⊤ fun y =>
((crossProduct (M.angularVelocity t)) fun j => (M.displacement t y).val 3 j - (M.comTrajectory t).val 3 j) ⬝ᵥ
(crossProduct (M.angularVelocity t)) fun j => (M.displacement t y).val 3 j - (M.comTrajectory t).val 3 j
exact (contDiff_cross_dotProduct_cross (M.angularVelocity t)).comp
(contDiff_pi.mpr fun j =>
((Space.eval_contDiff j).comp (M.displacement_contDiff t)).sub
contDiff_const) All goals completed! 🐙)) := by M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) t⊢ M.kineticEnergy t =
1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
((crossProduct (M.angularVelocity t)) fun j =>
(M.displacement t y).val 3 j - (M.comTrajectory t).val 3 j) ⬝ᵥ
(crossProduct (M.angularVelocity t)) fun j => (M.displacement t y).val 3 j - (M.comTrajectory t).val 3 j)
⋯)
rw [M.kineticEnergy_eq_translational_add_rotational t h M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) t⊢ 1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j)
⋯) =
1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
((crossProduct (M.angularVelocity t)) fun j =>
(M.displacement t y).val 3 j - (M.comTrajectory t).val 3 j) ⬝ᵥ
(crossProduct (M.angularVelocity t)) fun j => (M.displacement t y).val 3 j - (M.comTrajectory t).val 3 j)
⋯) M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) t⊢ 1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j)
⋯) =
1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
((crossProduct (M.angularVelocity t)) fun j =>
(M.displacement t y).val 3 j - (M.comTrajectory t).val 3 j) ⬝ᵥ
(crossProduct (M.angularVelocity t)) fun j => (M.displacement t y).val 3 j - (M.comTrajectory t).val 3 j)
⋯)] M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) t⊢ 1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j)
⋯) =
1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
((crossProduct (M.angularVelocity t)) fun j =>
(M.displacement t y).val 3 j - (M.comTrajectory t).val 3 j) ⬝ᵥ
(crossProduct (M.angularVelocity t)) fun j => (M.displacement t y).val 3 j - (M.comTrajectory t).val 3 j)
⋯)
congr 1 e_a M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) t⊢ 1 / 2 *
M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j)
⋯) =
1 / 2 *
M.ρ
(cmap
(fun y =>
((crossProduct (M.angularVelocity t)) fun j => (M.displacement t y).val 3 j - (M.comTrajectory t).val 3 j) ⬝ᵥ
(crossProduct (M.angularVelocity t)) fun j => (M.displacement t y).val 3 j - (M.comTrajectory t).val 3 j)
⋯)
congr 2 e_a.e_a.e_6 M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) t⊢ cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j)
⋯ =
cmap
(fun y =>
((crossProduct (M.angularVelocity t)) fun j => (M.displacement t y).val 3 j - (M.comTrajectory t).val 3 j) ⬝ᵥ
(crossProduct (M.angularVelocity t)) fun j => (M.displacement t y).val 3 j - (M.comTrajectory t).val 3 j)
⋯
ext y e_a.e_a.e_6 M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) ty:Space⊢ (cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j)
⋯)
y =
(cmap
(fun y =>
((crossProduct (M.angularVelocity t)) fun j => (M.displacement t y).val 3 j - (M.comTrajectory t).val 3 j) ⬝ᵥ
(crossProduct (M.angularVelocity t)) fun j => (M.displacement t y).val 3 j - (M.comTrajectory t).val 3 j)
⋯)
y
simp only [cmap_apply, M.deriv_orientation_mulVec_eq_angularVelocity_cross y t hR] All goals completed! 🐙
König's theorem in the body frame. The total kinetic energy M.kineticEnergy t, formed from
the lab-frame point velocities, splits at the centre of mass (centerOfMass = 0) as
T = ½ M ⟪V, V⟫ + rotationalKineticEnergy ω_body. The rotational energy is a frame-independent
scalar, so it is evaluated here from the body-frame angular velocity ω_body: the spatial form
|Ṙ (y − c)|² and the body form |ω_body × (y − c)|² agree because
Ṙ (y − c) = R (ω_body × (y − c)) and R, being orthogonal, preserves the norm.
theorem kineticEnergy_eq_translational_add_bodyAngularVelocity (M : RigidBodyMotion 3) (t : Time)
(h : M.mass ≠ 0) (hR : DifferentiableAt ℝ (fun s => (M.orientation s).1) t)
(hc : M.centerOfMass = 0) :
M.kineticEnergy t
= (1 / (2 : ℝ)) * M.mass * (⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ)
+ M.toRigidBody.rotationalKineticEnergy (M.bodyAngularVelocity t) := by M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) thc:M.centerOfMass = 0⊢ M.kineticEnergy t =
1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
M.rotationalKineticEnergy (M.bodyAngularVelocity t)
rw [M.kineticEnergy_eq_translational_add_rotational t h, M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) thc:M.centerOfMass = 0⊢ 1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j)
⋯) =
1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
M.rotationalKineticEnergy (M.bodyAngularVelocity t) M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) thc:M.centerOfMass = 0⊢ 1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j)
⋯) =
1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
⟨fun x =>
(crossProduct (M.bodyAngularVelocity t)) (x.val 3) ⬝ᵥ (crossProduct (M.bodyAngularVelocity t)) (x.val 3), ⋯⟩
RigidBody.rotationalKineticEnergy_eq_integral M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) thc:M.centerOfMass = 0⊢ 1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j)
⋯) =
1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
⟨fun x =>
(crossProduct (M.bodyAngularVelocity t)) (x.val 3) ⬝ᵥ (crossProduct (M.bodyAngularVelocity t)) (x.val 3), ⋯⟩ M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) thc:M.centerOfMass = 0⊢ 1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j)
⋯) =
1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
⟨fun x =>
(crossProduct (M.bodyAngularVelocity t)) (x.val 3) ⬝ᵥ (crossProduct (M.bodyAngularVelocity t)) (x.val 3), ⋯⟩] M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) thc:M.centerOfMass = 0⊢ 1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j)
⋯) =
1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
1 / 2 *
M.ρ
⟨fun x =>
(crossProduct (M.bodyAngularVelocity t)) (x.val 3) ⬝ᵥ (crossProduct (M.bodyAngularVelocity t)) (x.val 3), ⋯⟩
congr 1 e_a M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) thc:M.centerOfMass = 0⊢ 1 / 2 *
M.ρ
(cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j)
⋯) =
1 / 2 *
M.ρ
⟨fun x =>
(crossProduct (M.bodyAngularVelocity t)) (x.val 3) ⬝ᵥ (crossProduct (M.bodyAngularVelocity t)) (x.val 3), ⋯⟩
congr 2 e_a.e_a.e_6 M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) thc:M.centerOfMass = 0⊢ cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j)
⋯ =
⟨fun x => (crossProduct (M.bodyAngularVelocity t)) (x.val 3) ⬝ᵥ (crossProduct (M.bodyAngularVelocity t)) (x.val 3), ⋯⟩
ext y e_a.e_a.e_6 M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) thc:M.centerOfMass = 0y:Space⊢ (cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j)
⋯)
y =
⟨fun x => (crossProduct (M.bodyAngularVelocity t)) (x.val 3) ⬝ᵥ (crossProduct (M.bodyAngularVelocity t)) (x.val 3), ⋯⟩
y
have hy : (fun j => (y : Fin 3 → ℝ) j - M.centerOfMass j) = (y : Fin 3 → ℝ) := by M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) thc:M.centerOfMass = 0⊢ M.kineticEnergy t =
1 / 2 * M.mass * ⟪M.centerOfMassVelocity t, M.centerOfMassVelocity t⟫_ℝ +
M.rotationalKineticEnergy (M.bodyAngularVelocity t) e_a.e_a.e_6 M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) thc:M.centerOfMass = 0y:Spacehy:(fun j => y.val 3 j - M.centerOfMass.val 3 j) = y.val 3⊢ (cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j)
⋯)
y =
⟨fun x => (crossProduct (M.bodyAngularVelocity t)) (x.val 3) ⬝ᵥ (crossProduct (M.bodyAngularVelocity t)) (x.val 3), ⋯⟩
y
simp [hc]e_a.e_a.e_6 M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) thc:M.centerOfMass = 0y:Spacehy:(fun j => y.val 3 j - M.centerOfMass.val 3 j) = y.val 3⊢ (cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j)
⋯)
y =
⟨fun x => (crossProduct (M.bodyAngularVelocity t)) (x.val 3) ⬝ᵥ (crossProduct (M.bodyAngularVelocity t)) (x.val 3), ⋯⟩
ye_a.e_a.e_6 M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) thc:M.centerOfMass = 0y:Spacehy:(fun j => y.val 3 j - M.centerOfMass.val 3 j) = y.val 3⊢ (cmap
(fun y =>
(∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j)
⋯)
y =
⟨fun x => (crossProduct (M.bodyAngularVelocity t)) (x.val 3) ⬝ᵥ (crossProduct (M.bodyAngularVelocity t)) (x.val 3), ⋯⟩
y
simp only [cmap_apply, ContMDiffMap.coeFn_mk] e_a.e_a.e_6 M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) thc:M.centerOfMass = 0y:Spacehy:(fun j => y.val 3 j - M.centerOfMass.val 3 j) = y.val 3⊢ ((∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j) ⬝ᵥ
∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ fun j => y.val 3 j - M.centerOfMass.val 3 j) =
(crossProduct (M.bodyAngularVelocity t)) (y.val 3) ⬝ᵥ (crossProduct (M.bodyAngularVelocity t)) (y.val 3)
rw [hy, e_a.e_a.e_6 M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) thc:M.centerOfMass = 0y:Spacehy:(fun j => y.val 3 j - M.centerOfMass.val 3 j) = y.val 3⊢ ∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ y.val 3 ⬝ᵥ ∂ₜ (fun s => ↑(M.orientation s)) t *ᵥ y.val 3 =
(crossProduct (M.bodyAngularVelocity t)) (y.val 3) ⬝ᵥ (crossProduct (M.bodyAngularVelocity t)) (y.val 3) All goals completed! 🐙 M.deriv_orientation_mulVec_eq_orientation_bodyAngularVelocity_cross (y : Fin 3 → ℝ) t hR, e_a.e_a.e_6 M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) thc:M.centerOfMass = 0y:Spacehy:(fun j => y.val 3 j - M.centerOfMass.val 3 j) = y.val 3⊢ ↑(M.orientation t) *ᵥ (crossProduct (M.bodyAngularVelocity t)) (y.val 3) ⬝ᵥ
↑(M.orientation t) *ᵥ (crossProduct (M.bodyAngularVelocity t)) (y.val 3) =
(crossProduct (M.bodyAngularVelocity t)) (y.val 3) ⬝ᵥ (crossProduct (M.bodyAngularVelocity t)) (y.val 3) All goals completed! 🐙
Matrix.dotProduct_mulVec_orthogonal (mul_eq_one_comm.mp (M.orientation_mul_transpose t)) e_a.e_a.e_6 M:RigidBodyMotion 3t:Timeh:M.mass ≠ 0hR:DifferentiableAt ℝ (fun s => ↑(M.orientation s)) thc:M.centerOfMass = 0y:Spacehy:(fun j => y.val 3 j - M.centerOfMass.val 3 j) = y.val 3⊢ (crossProduct (M.bodyAngularVelocity t)) (y.val 3) ⬝ᵥ (crossProduct (M.bodyAngularVelocity t)) (y.val 3) =
(crossProduct (M.bodyAngularVelocity t)) (y.val 3) ⬝ᵥ (crossProduct (M.bodyAngularVelocity t)) (y.val 3) All goals completed! 🐙] All goals completed! 🐙