ClassicalMechanics.SimplePendulum.gradient_potentialEnergy
theoremverifiedformalizationimported Lean
The gradient of the potential energy of the simple pendulum is m g ℓ sin θ times the unit vector of the angular coordinate.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in open ClassicalMechanics ClassicalMechanics.SimplePendulum in open Real InnerProductSpace in variable (S : SimplePendulum) in open scoped ContDiff in lemma ClassicalMechanics.SimplePendulum.gradient_potentialEnergy (x : EuclideanSpace ℝ (Fin 1)) : gradient S.potentialEnergy x = (S.m * S.g * S.ℓ * Real.sin (x 0)) • EuclideanSpace.single 0 1
- Formalizes
- Physlib, `ClassicalMechanics.SimplePendulum.gradient_potentialEnergy`
- Lean proof
- By Aadarsh Agarwal, from github.com/leanprover-community/physlib at
e411c6e89692(Copyright (c) 2026 Aadarsh Agarwal. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.34.1.ClassicalMechanics.SimplePendulum.gradient_potentialEnergy← ClassicalMechanics.SimplePendulum.gradient_potentialEnergy (Physlib/ClassicalMechanics/Pendulum/SimplePendulum/Basic.lean:364): verbatim
- Verified
- 09 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 11
- gradient_add_constAdding a constant to a function does not change its gradient.
- ClassicalMechanics.SimplePendulumThe simple gravity pendulum is specified by the mass
mof its bob, the lengthℓof its rod, and the gravitational accelerationg.… - ClassicalMechanics.SimplePendulum.potentialEnergyThe potential energy of the simple pendulum at the angle
xism g ℓ (1 - cos (x 0)), the work done against gravity in raising the bob… - ClassicalMechanics.SimplePendulum.m_ne_zeroThe mass of the bob is not equal to zero.
- gradient_const_mulThe gradient of a constant multiple of a differentiable function is the constant multiple of the gradient.
- ClassicalMechanics.SimplePendulum.inertia_ne_zeroThe moment of inertia of the simple pendulum is not equal to zero.
- ClassicalMechanics.SimplePendulum.potentialEnergy_eqThe potential energy of the simple pendulum, written out.
- ClassicalMechanics.SimplePendulum.g_ne_zeroThe gravitational acceleration is not equal to zero.
- ClassicalMechanics.SimplePendulum.ℓ_ne_zeroThe length of the rod is not equal to zero.
- ClassicalMechanics.SimplePendulum.ω_posThe angular frequency of the simple pendulum is positive.
- gradient_comp_coordChain rule for a function of one coordinate: the gradient of
y ↦ f (y i)atxisf' • EuclideanSpace.single i 1, wheref'is the…
- Used by 1
- ClassicalMechanics.SimplePendulum.torque_eqThe torque of the simple pendulum is
-m g ℓ sin θtimes the unit vector of the angular coordinate. It is restoring near the bottom of…
- ClassicalMechanics.SimplePendulum.torque_eqThe torque of the simple pendulum is
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
set_option autoImplicit true inset_option relaxedAutoImplicit true inopen ClassicalMechanics ClassicalMechanics.SimplePendulum inopen Real InnerProductSpace invariable (S : SimplePendulum) inopen scoped ContDiff in/-- The gradient of the potential energy of the simple pendulum is `m g ℓ sin θ` times the unit vector of the angular coordinate. -/lemma ClassicalMechanics.SimplePendulum.gradient_potentialEnergy (x : EuclideanSpace ℝ (Fin 1)) : gradient S.potentialEnergy x = (S.m * S.g * S.ℓ * Real.sin (x 0)) • EuclideanSpace.single 0 1 := by have hcos : DifferentiableAt ℝ (fun y : EuclideanSpace ℝ (Fin 1) => Real.cos (y 0)) x := by fun_prop have h : S.potentialEnergy = fun y : EuclideanSpace ℝ (Fin 1) => -(S.m * S.g * S.ℓ) * Real.cos (y 0) + S.m * S.g * S.ℓ := by funext y rw [potentialEnergy_eq] ring rw [h, gradient_add_const, gradient_const_mul _ hcos, gradient_comp_coord 0 x (Real.hasDerivAt_cos (x 0))] module