AFTD Auto-Formalizing Theoretical Domains

ClassicalMechanics.SimplePendulum.potentialEnergy

defimported Lean

The potential energy of the simple pendulum at the angle x is m g ℓ (1 - cos (x 0)), the work done against gravity in raising the bob from the bottom of the swing. It is normalized to vanish at the bottom.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open ClassicalMechanics in
open Real InnerProductSpace in
variable (S : SimplePendulum) in
open scoped ContDiff in
noncomputable def ClassicalMechanics.SimplePendulum.potentialEnergy (x : EuclideanSpace ℝ (Fin 1)) : ℝ
Defined in
Physlib, `ClassicalMechanics.SimplePendulum.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.
Verified
09 Oct 2026
Axioms
none listed
Built on 6
Used by 11

Lean source view module on GitHub

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open ClassicalMechanics in
open Real InnerProductSpace in
variable (S : SimplePendulum) in
open scoped ContDiff in
/-- The potential energy of the simple pendulum at the angle `x` is `m g ℓ (1 - cos (x 0))`, the work done against gravity in raising the bob from the bottom of the swing. It is normalized to vanish at the bottom. -/
noncomputable def ClassicalMechanics.SimplePendulum.potentialEnergy (x : EuclideanSpace ℝ (Fin 1)) : ℝ :=
  S.m * S.g * S.ℓ * (1 - Real.cos (x 0))
See it in the graphDiscuss this resultChallenge it