Prove energy dissipation rate for damped harmonic oscillator#967
Open
JayYarlott wants to merge 12 commits intoleanprover-community:masterfrom
Open
Prove energy dissipation rate for damped harmonic oscillator#967JayYarlott wants to merge 12 commits intoleanprover-community:masterfrom
JayYarlott wants to merge 12 commits intoleanprover-community:masterfrom
Conversation
jstoobysmith
reviewed
Mar 3, 2026
Member
jstoobysmith
left a comment
There was a problem hiding this comment.
I've added some review comments - I was a bit pedantic, but hopefully they are useful
PhysLean/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean
Outdated
Show resolved
Hide resolved
PhysLean/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean
Outdated
Show resolved
Hide resolved
PhysLean/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean
Outdated
Show resolved
Hide resolved
PhysLean/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean
Outdated
Show resolved
Hide resolved
PhysLean/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean
Outdated
Show resolved
Hide resolved
PhysLean/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean
Outdated
Show resolved
Hide resolved
jstoobysmith
reviewed
Mar 3, 2026
Member
jstoobysmith
left a comment
There was a problem hiding this comment.
Many thanks, two more quick comments.
| - S.γ * Time.deriv x t := by linarith [h1 t] | ||
|
|
||
| -- Break equation apart | ||
| rw [energy] |
Member
There was a problem hiding this comment.
rw [energy, kineticEnergy, potentialEnergy]?
If this doesn't work then we should likely have theorems kineticEnergy_eq and potentialEnergy_eq which experts the definitional equality of kineticEnergy and potentialEnergy. Using unfold is generally not the best idea, although I acknowledge that it is used throughout this project.
| have hPE := ((hdx t).hasFDerivAt.pow 2).const_mul (1/2 * S.k) | ||
|
|
||
| rw [(hKE.add hPE).fderiv] | ||
|
|
Member
There was a problem hiding this comment.
Could we remove these extra new lines in the proof?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on #891 by adding proofs of the energy dissipation rate for a damped harmonic oscillator.