Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
499 commits
Select commit Hold shift + click to select a range
dfe24bf
refactor: golf unitary and ulift witnesses
Vilin97 Jul 1, 2026
4a8e6ec
refactor: golf ulift and unit equivalence witnesses
Vilin97 Jul 1, 2026
a13962e
refactor: golf Hilbert-Schmidt op-star hom witnesses
Vilin97 Jul 1, 2026
4f3b9ee
refactor: remove non-golf proof expansions
Vilin97 Jul 1, 2026
bb9cbd2
refactor: golf bundled channel map wrappers
Vilin97 Jul 1, 2026
fbbed1f
refactor: golf channel choi wrappers
Vilin97 Jul 1, 2026
5749036
refactor: golf matrix map wrapper fields
Vilin97 Jul 1, 2026
bf124cd
refactor: golf channel matrix identities
Vilin97 Jul 1, 2026
18f9fa5
refactor: golf cptp trace wrappers
Vilin97 Jul 1, 2026
2540ffe
refactor: golf unbundled channel identities
Vilin97 Jul 1, 2026
a6ae609
refactor: drop non-golf proof rewrites
Vilin97 Jul 1, 2026
7c29851
refactor: golf unbundled positivity proofs
Vilin97 Jul 1, 2026
4f1e21d
refactor: golf dual channel proofs
Vilin97 Jul 1, 2026
cf35fe9
refactor: golf channel algebra proofs
Vilin97 Jul 1, 2026
96dc819
refactor: golf matrix and state witnesses
Vilin97 Jul 1, 2026
2b4774e
refactor: golf direct witness terms
Vilin97 Jul 1, 2026
548a125
refactor: golf bundled extensionality proofs
Vilin97 Jul 1, 2026
99c5ca8
refactor: golf tensor invariance proofs
Vilin97 Jul 1, 2026
298e109
refactor: golf complex unit tensor identities
Vilin97 Jul 1, 2026
6eb53f3
refactor: golf tensor metric wrappers
Vilin97 Jul 1, 2026
27d71d3
refactor: golf relation and tensor invariant proofs
Vilin97 Jul 1, 2026
477cff5
refactor: golf quantum information proof wrappers
Vilin97 Jul 1, 2026
39c17eb
refactor: golf rewrite-exact proof steps
Vilin97 Jul 1, 2026
82ff60f
refactor: golf physics rewrite proofs
Vilin97 Jul 1, 2026
24d0733
refactor: golf rewrite witness proofs
Vilin97 Jul 1, 2026
8007dc5
refactor: golf local rewrite proofs
Vilin97 Jul 1, 2026
3f367b4
refactor: golf top-level rewrite wrappers
Vilin97 Jul 1, 2026
961a95c
refactor: golf singleton and continuity wrappers
Vilin97 Jul 1, 2026
471fa0e
refactor: audit and golf adjoint wrappers
Vilin97 Jul 1, 2026
a93b9f7
refactor: golf variance and geometry wrappers
Vilin97 Jul 1, 2026
2066781
refactor: golf direct wrapper proofs
Vilin97 Jul 1, 2026
c487d0a
refactor: golf hermitian order wrappers
Vilin97 Jul 1, 2026
58faacf
refactor: golf QFT and oscillator wrappers
Vilin97 Jul 1, 2026
ad7ef9f
refactor: golf closure and exponent proofs
Vilin97 Jul 1, 2026
ec58073
refactor: golf rewrite wrapper proofs
Vilin97 Jul 1, 2026
ae5e609
refactor: golf basis evaluation proofs
Vilin97 Jul 1, 2026
08748f4
refactor: golf QED basis component proofs
Vilin97 Jul 1, 2026
03f3646
refactor: golf QED anomaly wrapper proofs
Vilin97 Jul 1, 2026
9e87d78
refactor: golf anomaly plane wrapper proofs
Vilin97 Jul 1, 2026
56f2ab7
refactor: golf family map wrapper proofs
Vilin97 Jul 1, 2026
43e9643
refactor: golf Wick list wrapper proofs
Vilin97 Jul 1, 2026
5cb24c3
refactor: remove neutral proof-golf churn
Vilin97 Jul 1, 2026
049e497
refactor: golf convex roof and finite ensemble proofs
Vilin97 Jul 1, 2026
7f36fd7
refactor: golf Wick time-condition proofs
Vilin97 Jul 1, 2026
c641208
refactor: golf canonical ensemble wrappers
Vilin97 Jul 1, 2026
45a10c1
refactor: golf tensor and Wick wrappers
Vilin97 Jul 1, 2026
3ae8efd
refactor: golf oscillator and tensor wrappers
Vilin97 Jul 1, 2026
ad0684a
refactor: golf Hermitian cfc wrappers
Vilin97 Jul 1, 2026
32786f8
refactor: golf Hermitian rpow witnesses
Vilin97 Jul 1, 2026
fb69087
refactor: golf Hermitian cfc local witnesses
Vilin97 Jul 1, 2026
19fdd5f
refactor: golf majorization witnesses
Vilin97 Jul 1, 2026
5ac886c
refactor: golf relative entropy witnesses
Vilin97 Jul 1, 2026
56564fc
refactor: golf entropy DPI witnesses
Vilin97 Jul 1, 2026
d4d5ea1
refactor: golf Hermitian order and log witnesses
Vilin97 Jul 1, 2026
1ca20f2
refactor: golf Hermitian cfc and rpow witnesses
Vilin97 Jul 1, 2026
c66b5ea
refactor: golf Hermitian concavity witnesses
Vilin97 Jul 1, 2026
82fbf02
refactor: golf relativity timelike witnesses
Vilin97 Jul 1, 2026
d9efc56
refactor: golf space boundedness witnesses
Vilin97 Jul 1, 2026
b501529
refactor: golf entropy and mixed-state witnesses
Vilin97 Jul 1, 2026
871b107
refactor: golf math wrapper witnesses
Vilin97 Jul 1, 2026
2de230d
refactor: golf trace norm and uncertainty witnesses
Vilin97 Jul 1, 2026
f4f98d6
refactor: golf relativity and time wrappers
Vilin97 Jul 1, 2026
5e30c8d
refactor: golf Physlib wrapper witnesses
Vilin97 Jul 1, 2026
30c714c
refactor: golf QED and Hilbert wrappers
Vilin97 Jul 1, 2026
9b53d6a
refactor: golf quantum information witnesses
Vilin97 Jul 1, 2026
ddd88bc
refactor: golf relativity and rational wrappers
Vilin97 Jul 1, 2026
e4be166
refactor: golf unit scale wrappers
Vilin97 Jul 1, 2026
93cb80f
refactor: golf Fin extraction wrappers
Vilin97 Jul 1, 2026
90095f6
refactor: golf field-op supercommute wrappers
Vilin97 Jul 1, 2026
7236422
refactor: golf tensor vector module wrappers
Vilin97 Jul 1, 2026
d7ae52d
refactor: golf Lorentz toVector wrappers
Vilin97 Jul 1, 2026
c6552a7
refactor: golf Wick contraction wrappers
Vilin97 Jul 1, 2026
782b719
refactor: golf symmetric linear map wrappers
Vilin97 Jul 1, 2026
e7287d9
refactor: golf relative entropy wrappers
Vilin97 Jul 1, 2026
33d6a58
refactor: golf Lowner-Heinz core wrappers
Vilin97 Jul 1, 2026
251b34c
refactor: golf Pauli and Weyl wrappers
Vilin97 Jul 1, 2026
18edf42
refactor: golf relativity complexification wrappers
Vilin97 Jul 1, 2026
dbeb2db
refactor: golf QFT algebra wrappers
Vilin97 Jul 1, 2026
0769f00
refactor: golf space and time derivative wrappers
Vilin97 Jul 1, 2026
801fc65
refactor: golf Hermitian matrix wrappers
Vilin97 Jul 1, 2026
1c3ab16
refactor: golf CKM and Higgs wrappers
Vilin97 Jul 1, 2026
4aea2b7
refactor: golf trace inequality block wrappers
Vilin97 Jul 1, 2026
225c264
refactor: golf QFT field specification wrappers
Vilin97 Jul 1, 2026
1334884
refactor: golf canonical ensemble wrappers
Vilin97 Jul 1, 2026
6a9e53b
refactor: golf relativity tensor wrappers
Vilin97 Jul 1, 2026
d4168ab
refactor: golf Lowner-Heinz core wrappers
Vilin97 Jul 1, 2026
0ce0880
refactor: golf Jensen trace-inequality wrappers
Vilin97 Jul 1, 2026
1a79510
refactor: golf canonical ensemble witnesses
Vilin97 Jul 1, 2026
ee4b3ae
refactor: golf Hermitian matrix witnesses
Vilin97 Jul 1, 2026
31e2a50
refactor: golf matrix witnesses
Vilin97 Jul 1, 2026
8b12ab9
refactor: golf classical mechanics witnesses
Vilin97 Jul 1, 2026
414c4cb
refactor: golf particle physics witnesses
Vilin97 Jul 1, 2026
2c6583b
refactor: golf QFT Wick witnesses
Vilin97 Jul 1, 2026
63a2fd7
refactor: golf space and time witnesses
Vilin97 Jul 1, 2026
a82017c
refactor: golf unit witnesses
Vilin97 Jul 1, 2026
f371705
refactor: golf quantum information witnesses
Vilin97 Jul 1, 2026
2843ba8
refactor: golf relativity tensor witnesses
Vilin97 Jul 1, 2026
61ce478
refactor: golf SU5 spectrum witnesses
Vilin97 Jul 1, 2026
55a18d8
refactor: golf quantum mechanics witnesses
Vilin97 Jul 1, 2026
195b800
refactor: golf mathematics witnesses
Vilin97 Jul 1, 2026
3bb5353
refactor: golf QFT contraction witnesses
Vilin97 Jul 1, 2026
37f65eb
refactor: golf physics wrapper witnesses
Vilin97 Jul 1, 2026
d1b02a4
refactor: golf QuantumInfo wrapper witnesses
Vilin97 Jul 1, 2026
1d78a2b
refactor: golf QFT and relativity exact proofs
Vilin97 Jul 1, 2026
feb2da3
refactor: golf QuantumInfo exact proofs
Vilin97 Jul 1, 2026
fe44e2a
refactor: golf relativity and quantum mechanics exact proofs
Vilin97 Jul 1, 2026
c5f2cfa
refactor: golf QuantumInfo follow-up exact proofs
Vilin97 Jul 1, 2026
4a2da03
refactor: golf unfold setup proofs
Vilin97 Jul 1, 2026
f465d59
refactor: golf follow-up unfold setup proofs
Vilin97 Jul 1, 2026
a17605e
refactor: golf remaining unfold setup proofs
Vilin97 Jul 1, 2026
524f183
refactor: golf Lowner-Heinz self-adjoint witnesses
Vilin97 Jul 1, 2026
0110d0c
refactor: golf Lowner-Heinz interval setup proofs
Vilin97 Jul 1, 2026
259cd16
refactor: golf Lowner-Heinz spectrum witnesses
Vilin97 Jul 1, 2026
857d2de
refactor: golf Lowner-Heinz CFC composition witnesses
Vilin97 Jul 1, 2026
c24d145
refactor: golf Lowner-Heinz shifted CFC witnesses
Vilin97 Jul 1, 2026
cf352ec
refactor: golf Lowner-Heinz inverse witnesses
Vilin97 Jul 1, 2026
445ce36
refactor: golf Lowner-Heinz positivity witnesses
Vilin97 Jul 1, 2026
089ceba
refactor: golf Lowner-Heinz CFC congruence witnesses
Vilin97 Jul 1, 2026
eef3570
refactor: golf redundant local unfold witnesses
Vilin97 Jul 1, 2026
38387a8
refactor: golf trace inequality setup witnesses
Vilin97 Jul 1, 2026
ee140db
refactor: golf one-dimensional operator rewrites
Vilin97 Jul 1, 2026
09a7527
refactor: golf divergence unfold proofs
Vilin97 Jul 1, 2026
527d64b
refactor: golf Weyl tensor smul fields
Vilin97 Jul 1, 2026
5a2d69a
refactor: golf complex tensor smul fields
Vilin97 Jul 1, 2026
7602871
refactor: golf tensor unit smul fields
Vilin97 Jul 1, 2026
2babb11
refactor: golf representation identity proofs
Vilin97 Jul 1, 2026
f560fd1
refactor: golf contraction scalar proofs
Vilin97 Jul 1, 2026
ff0c1f0
refactor: golf vector contraction scalar proofs
Vilin97 Jul 1, 2026
689cfb6
refactor: golf QFT field proof wrappers
Vilin97 Jul 1, 2026
d64c6f0
refactor: golf QFT grading proofs
Vilin97 Jul 1, 2026
be45582
refactor: golf quantum info wrapper proofs
Vilin97 Jul 1, 2026
a508cbb
refactor: golf electromagnetism wrapper proofs
Vilin97 Jul 1, 2026
6837c24
refactor: golf electromagnetic derivative wrappers
Vilin97 Jul 1, 2026
1f7106e
refactor: golf electromagnetic dynamics wrappers
Vilin97 Jul 1, 2026
e1aaef1
refactor: golf relativity tensor wrappers
Vilin97 Jul 1, 2026
9c557a3
refactor: golf quantum info wrapper endings
Vilin97 Jul 1, 2026
d000430
refactor: golf math and QFT wrappers
Vilin97 Jul 1, 2026
e55bfdf
refactor: golf math and Wick wrapper proofs
Vilin97 Jul 1, 2026
6262e7f
refactor: golf wave and quantum wrappers
Vilin97 Jul 1, 2026
ee28cbc
refactor: golf electromagnetic wrapper endings
Vilin97 Jul 1, 2026
39d4d62
refactor: golf electromagnetic zero wrappers
Vilin97 Jul 1, 2026
c6d94cc
refactor: golf fin and variational wrappers
Vilin97 Jul 1, 2026
5edd110
refactor: golf tensor and unit rewrites
Vilin97 Jul 1, 2026
d3168f6
refactor: golf tensor and anomaly rewrites
Vilin97 Jul 1, 2026
23b11af
refactor: golf action and scalar wrappers
Vilin97 Jul 1, 2026
60c857a
refactor: golf derivative wrapper proofs
Vilin97 Jul 1, 2026
5d0e641
refactor: golf QED and unit wrappers
Vilin97 Jul 1, 2026
7d259d4
refactor: golf tensor matrix wrappers
Vilin97 Jul 1, 2026
705b837
refactor: golf tensor units and Hermite wrappers
Vilin97 Jul 1, 2026
d2bc230
refactor: golf QFT and F-theory sum wrappers
Vilin97 Jul 1, 2026
11a1fea
refactor: golf tensor vector wrappers
Vilin97 Jul 1, 2026
fb2bc54
refactor: golf real tensor complexification wrappers
Vilin97 Jul 1, 2026
6ca9928
refactor: golf tensor action wrappers
Vilin97 Jul 1, 2026
191597a
refactor: golf unit and derivative wrappers
Vilin97 Jul 1, 2026
727a7fa
refactor: golf normal-order and unit wrappers
Vilin97 Jul 1, 2026
b847567
refactor: golf normal-order swap wrappers
Vilin97 Jul 1, 2026
c239a2d
refactor: golf normal-order and SL2C wrappers
Vilin97 Jul 1, 2026
2c6dcbf
refactor: golf quantum information wrappers
Vilin97 Jul 1, 2026
2b1a644
refactor: golf space-time analytic wrappers
Vilin97 Jul 1, 2026
69acf14
refactor: golf tensor matrix wrappers
Vilin97 Jul 1, 2026
9fade67
refactor: golf anomaly cancellation wrappers
Vilin97 Jul 1, 2026
7333ce1
refactor: golf QED basis wrappers
Vilin97 Jul 1, 2026
c06c484
refactor: golf analytic wrapper proofs
Vilin97 Jul 1, 2026
34d4251
refactor: golf relative entropy wrappers
Vilin97 Jul 1, 2026
532504b
refactor: golf physics wrapper proofs
Vilin97 Jul 1, 2026
70f02e2
refactor: golf complex tensor unit basis wrappers
Vilin97 Jul 1, 2026
ce171cb
refactor: golf tensor and QED wrappers
Vilin97 Jul 1, 2026
8124214
refactor: golf finite sum and electromagnetic wrappers
Vilin97 Jul 1, 2026
6574c30
refactor: golf dimension and completion wrappers
Vilin97 Jul 1, 2026
3092208
refactor: golf complex basis wrappers
Vilin97 Jul 1, 2026
9e8e700
refactor: golf complex vector basis wrappers
Vilin97 Jul 1, 2026
c4be733
refactor: golf Lorentz and QuantumInfo wrappers
Vilin97 Jul 1, 2026
4227a54
refactor: golf normalization closers
Vilin97 Jul 1, 2026
2874b75
refactor: golf QuantumInfo proof closers
Vilin97 Jul 1, 2026
2d0b268
refactor: golf QED and QuantumInfo rewrite closers
Vilin97 Jul 1, 2026
d3e2a7c
refactor: golf definitional rfl proofs
Vilin97 Jul 1, 2026
33d5175
refactor: golf more definitional rfl proofs
Vilin97 Jul 1, 2026
efa4cd9
refactor: golf Electromagnetism rfl proofs
Vilin97 Jul 1, 2026
c620187
refactor: golf Electromagnetism kinematics rfl proofs
Vilin97 Jul 1, 2026
af1346d
refactor: golf Relativity tensor rfl proofs
Vilin97 Jul 1, 2026
241b411
refactor: golf QuantumMechanics rfl proofs
Vilin97 Jul 1, 2026
d529a15
refactor: golf mathematics rfl proofs
Vilin97 Jul 1, 2026
590eab8
refactor: golf operator rfl proofs
Vilin97 Jul 1, 2026
715f5de
refactor: golf more inline rfl proofs
Vilin97 Jul 1, 2026
8d3b327
refactor: golf Prob coercion proofs
Vilin97 Jul 1, 2026
7e7acae
refactor: golf Prob mixable proofs
Vilin97 Jul 1, 2026
496472a
refactor: golf probability definitional proofs
Vilin97 Jul 1, 2026
e433dfb
refactor: golf QuantumInfo definition proofs
Vilin97 Jul 1, 2026
5442af8
refactor: golf state rfl proofs
Vilin97 Jul 1, 2026
255e44c
refactor: golf spectral and mixed-state rfl proofs
Vilin97 Jul 1, 2026
93ab278
refactor: golf channel wrapper rfl proofs
Vilin97 Jul 1, 2026
bc4251a
refactor: golf proof tails and wrappers
Vilin97 Jul 1, 2026
c2df9bf
refactor: golf geometry and tensor rfl proofs
Vilin97 Jul 1, 2026
da33925
refactor: inline remaining simple rfl proofs
Vilin97 Jul 1, 2026
84af6c0
refactor: golf unit div_self proofs
Vilin97 Jul 1, 2026
03d2855
refactor: golf direct tensor proof terms
Vilin97 Jul 1, 2026
4f0c8a0
refactor: golf list and contraction wrappers
Vilin97 Jul 1, 2026
3907bf4
refactor: golf derivative and lagrangian wrappers
Vilin97 Jul 1, 2026
734bd03
refactor: golf tensor and mechanics one-line proofs
Vilin97 Jul 1, 2026
4b67a43
refactor: golf divergence and trace proofs
Vilin97 Jul 1, 2026
3da87e5
refactor: golf real tensor action proofs
Vilin97 Jul 1, 2026
fa3d3ba
refactor: golf ddim quantum operator proofs
Vilin97 Jul 1, 2026
dbfc2d5
refactor: golf relativity and metric one-step proofs
Vilin97 Jul 1, 2026
a9d0883
refactor: golf field statistics and anomaly wrappers
Vilin97 Jul 1, 2026
93ccb2d
refactor: golf space and time one-step proofs
Vilin97 Jul 1, 2026
18c3271
refactor: golf nonsingular hermitian wrappers
Vilin97 Jul 1, 2026
6f927a4
refactor: golf unitary and hermitian wrappers
Vilin97 Jul 1, 2026
f256ca8
refactor: golf hermitian power helpers
Vilin97 Jul 1, 2026
50a49e0
refactor: golf hermitian cfc helpers
Vilin97 Jul 1, 2026
a2da45f
refactor: golf finite and norm helper proofs
Vilin97 Jul 1, 2026
892c086
refactor: golf short proof wrappers
Vilin97 Jul 1, 2026
0ee67b7
refactor: golf oscillator and ensemble wrappers
Vilin97 Jul 1, 2026
0ffe7ee
refactor: golf space and matrix wrappers
Vilin97 Jul 1, 2026
aee2afd
refactor: golf hermitian norm wrappers
Vilin97 Jul 1, 2026
aabdb54
refactor: golf oscillator and anomaly wrappers
Vilin97 Jul 1, 2026
ba437dc
refactor: golf damped oscillator rewrites
Vilin97 Jul 1, 2026
e69ae84
refactor: golf oscillator derivative rewrites
Vilin97 Jul 1, 2026
80ab7f4
refactor: golf classical rewrite sequences
Vilin97 Jul 1, 2026
7ec0f2c
refactor: golf calculus rewrite sequences
Vilin97 Jul 1, 2026
7c13360
refactor: golf insertion sort rewrites
Vilin97 Jul 1, 2026
d74be98
refactor: golf trigonometry and variational rewrites
Vilin97 Jul 1, 2026
4fcf712
refactor: golf variational derivative rewrites
Vilin97 Jul 1, 2026
9164b14
refactor: golf qft section rewrites
Vilin97 Jul 1, 2026
7966900
refactor: golf wick grading rewrites
Vilin97 Jul 1, 2026
3f2c1b5
refactor: golf wick normal-order rewrites
Vilin97 Jul 1, 2026
519a517
refactor: golf wick super-commute rewrites
Vilin97 Jul 1, 2026
6cea4c5
refactor: golf anomaly cancellation rewrites
Vilin97 Jul 1, 2026
43b9663
refactor: golf wick contraction time rewrites
Vilin97 Jul 1, 2026
d0511e0
refactor: golf wick time-order rewrites
Vilin97 Jul 1, 2026
fc32ddf
refactor: golf qft ordering and sign proofs
Vilin97 Jul 1, 2026
3218eea
refactor: golf koszul time-order simplifications
Vilin97 Jul 1, 2026
a88b241
refactor: golf wick normal-order simplifications
Vilin97 Jul 1, 2026
1adcf39
refactor: golf wick normal-order zero proofs
Vilin97 Jul 1, 2026
7187399
refactor: golf wick insertion finite-set proofs
Vilin97 Jul 1, 2026
361581f
refactor: golf wick uncontracted finite-set proofs
Vilin97 Jul 1, 2026
b7058a8
refactor: golf complex tensor metric apply-one proofs
Vilin97 Jul 1, 2026
da68366
refactor: golf tensor unit apply-one proofs
Vilin97 Jul 1, 2026
fa161b8
refactor: golf Lorentz reindexing proof endings
Vilin97 Jul 1, 2026
a95ae6a
refactor: golf tensor and qft exact wrappers
Vilin97 Jul 1, 2026
689a07d
refactor: golf unit and finite-sum wrappers
Vilin97 Jul 1, 2026
d4447b4
refactor: golf particle scalar wrapper proofs
Vilin97 Jul 1, 2026
b5640df
refactor: golf time and unit wrapper proofs
Vilin97 Jul 1, 2026
a614556
refactor: golf finite-sum and order wrappers
Vilin97 Jul 1, 2026
56b59f5
refactor: golf curry and reindexing wrappers
Vilin97 Jul 1, 2026
d62c75f
refactor: golf fun-prop wrapper proofs
Vilin97 Jul 1, 2026
df1d2ec
refactor: golf complex tensor metric unit wrappers
Vilin97 Jul 1, 2026
ef20544
refactor: golf calculus and tensor wrappers
Vilin97 Jul 1, 2026
a662936
refactor: golf Hermitian log-exp wrappers
Vilin97 Jul 1, 2026
60b5891
Merge remote-tracking branch 'origin/master' into codex/golf-proofs-next
Vilin97 Jul 2, 2026
4e3d67f
fix: repair over-golfed proofs so CI builds green
Vilin97 Jul 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
41 changes: 14 additions & 27 deletions Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,8 @@ decreasing at that time. -/
lemma energy_not_conserved (xₜ : Time → EuclideanSpace ℝ (Fin 1)) (t : Time)
(h1 : S.EquationOfMotion xₜ) (hx : ContDiff ℝ ∞ xₜ) (hdx : ∂ₜ xₜ t ≠ 0) (hγ : 0 < S.γ) :
∂ₜ (S.energy xₜ) t < 0 := by
rw [energy_dissipation_rate S xₜ t h1 hx]
rw [neg_mul]
exact neg_neg_of_pos (mul_pos hγ (real_inner_self_pos.mpr hdx))
simpa [energy_dissipation_rate S xₜ t h1 hx, neg_mul] using
neg_neg_of_pos (mul_pos hγ (real_inner_self_pos.mpr hdx))

/-!
## C. Newton's second law
Expand Down Expand Up @@ -206,8 +205,7 @@ lemma equationOfMotion_iff_newtons_2nd_law (xₜ : Time → EuclideanSpace ℝ (
constructor
· intro h t
have h' :
S.m • ∂ₜ (∂ₜ xₜ) t + (S.γ • ∂ₜ xₜ t + S.k • xₜ t) = 0 := by
simpa [add_assoc] using h t
S.m • ∂ₜ (∂ₜ xₜ) t + (S.γ • ∂ₜ xₜ t + S.k • xₜ t) = 0 := by simpa [add_assoc] using h t
have ha :
S.m • ∂ₜ (∂ₜ xₜ) t = -(S.γ • ∂ₜ xₜ t + S.k • xₜ t) :=
eq_neg_of_add_eq_zero_left h'
Expand Down Expand Up @@ -267,39 +265,33 @@ lemma discriminant_eq_four_mul_m_sq_mul_decayRate_sq_sub_ω_sq :

/-- The decay rate is nonnegative. -/
lemma decayRate_nonneg : 0 ≤ S.decayRate := by
rw [decayRate]
exact div_nonneg S.γ_nonneg (by nlinarith [S.m_pos])
simpa [decayRate] using div_nonneg S.γ_nonneg (by nlinarith [S.m_pos])

/-- An undamped oscillator lies in the underdamped regime. -/
lemma isUnderdamped_of_gamma_eq_zero (hγ : S.γ = 0) : S.IsUnderdamped := by
rw [IsUnderdamped, discriminant_eq_four_mul_m_sq_mul_decayRate_sq_sub_ω_sq S, decayRate]
rw [hγ]
rw [IsUnderdamped, discriminant_eq_four_mul_m_sq_mul_decayRate_sq_sub_ω_sq S, decayRate, hγ]
ring_nf
nlinarith [sq_pos_of_pos S.m_pos, sq_pos_of_pos S.ω_pos]

/-- An underdamped system has decay rate less than the natural frequency. -/
lemma isUnderdamped_decayRate (hS : S.IsUnderdamped) : S.decayRate < S.ω := by
rw [IsUnderdamped] at hS
rw [discriminant_eq_four_mul_m_sq_mul_decayRate_sq_sub_ω_sq] at hS
rw [IsUnderdamped, discriminant_eq_four_mul_m_sq_mul_decayRate_sq_sub_ω_sq] at hS
have hm_sq_pos : 0 < 4 * S.m^2 := by
have hsq : 0 < S.m^2 := sq_pos_of_pos S.m_pos
nlinarith
have hsq : S.decayRate^2 < S.ω^2 := by
nlinarith
have hsq : S.decayRate^2 < S.ω^2 := by nlinarith
nlinarith [S.decayRate_nonneg, S.ω_pos]

/-- A critically damped system has decay rate equal to the natural frequency. -/
lemma isCriticallyDamped_decayRate (hS : S.IsCriticallyDamped) : S.ω = S.decayRate := by
rw [IsCriticallyDamped] at hS
rw [discriminant_eq_four_mul_m_sq_mul_decayRate_sq_sub_ω_sq] at hS
rw [IsCriticallyDamped, discriminant_eq_four_mul_m_sq_mul_decayRate_sq_sub_ω_sq] at hS
have hm_sq_ne_zero : 4 * S.m^2 ≠ 0 := by
have hm_sq_pos : 0 < 4 * S.m^2 := by
have hsq : 0 < S.m^2 := sq_pos_of_pos S.m_pos
nlinarith
exact ne_of_gt hm_sq_pos
have hsq : S.decayRate^2 = S.ω^2 := by
have hsub : S.decayRate^2 - S.ω^2 = 0 := by
exact (mul_eq_zero.mp hS).resolve_left hm_sq_ne_zero
have hsub : S.decayRate^2 - S.ω^2 = 0 := (mul_eq_zero.mp hS).resolve_left hm_sq_ne_zero
linarith
nlinarith [S.decayRate_nonneg, S.ω_pos]

Expand All @@ -317,20 +309,17 @@ lemma k_eq_m_mul_ω_sq : S.k = S.m * S.ω^2 := by
lemma k_eq_m_mul_decayRate_sq_of_criticallyDamped (hS : S.IsCriticallyDamped) :
S.k = S.m * S.decayRate^2 := by
have hωa : S.ω = S.decayRate := S.isCriticallyDamped_decayRate hS
have hωsq : S.decayRate ^ 2 = S.k / S.m := by
simpa [hωa] using S.ω_sq
have hωsq : S.decayRate ^ 2 = S.k / S.m := by simpa [hωa] using S.ω_sq
field_simp [S.m_ne_zero] at hωsq
nlinarith

/-- An overdamped system has decay rate greater than the natural frequency. -/
lemma isOverdamped_decayRate (hS : S.IsOverdamped) : S.ω < S.decayRate := by
rw [IsOverdamped] at hS
rw [discriminant_eq_four_mul_m_sq_mul_decayRate_sq_sub_ω_sq] at hS
rw [IsOverdamped, discriminant_eq_four_mul_m_sq_mul_decayRate_sq_sub_ω_sq] at hS
have hm_sq_pos : 0 < 4 * S.m^2 := by
have hsq : 0 < S.m^2 := sq_pos_of_pos S.m_pos
nlinarith
have hsq : S.ω^2 < S.decayRate^2 := by
nlinarith
have hsq : S.ω^2 < S.decayRate^2 := by nlinarith
nlinarith [S.decayRate_nonneg, S.ω_pos]

/-- In the underdamped regime, the selected frequency uses the oscillation frequency. -/
Expand Down Expand Up @@ -439,8 +428,7 @@ for the corresponding undamped harmonic oscillator. -/
lemma toUndamped_equationOfMotion (S : DampedHarmonicOscillator) (hS : S.IsUndamped)
(xₜ : Time → EuclideanSpace ℝ (Fin 1)) (hx : ContDiff ℝ ∞ xₜ) :
S.EquationOfMotion xₜ ↔ (S.toUndamped hS).EquationOfMotion xₜ := by
have hγ : S.γ = 0 := by
simpa [IsUndamped] using hS
have hγ : S.γ = 0 := by simpa [IsUndamped] using hS
rw [S.equationOfMotion_iff_newtons_2nd_law xₜ,
(S.toUndamped hS).equationOfMotion_iff_newtons_2nd_law xₜ hx]
constructor
Expand All @@ -454,8 +442,7 @@ lemma toUndamped_equationOfMotion (S : DampedHarmonicOscillator) (hS : S.IsUndam
calc
S.m • ∂ₜ (∂ₜ xₜ) t = (S.toUndamped hS).m • ∂ₜ (∂ₜ xₜ) t := rfl
_ = HarmonicOscillator.force (S.toUndamped hS) (xₜ t) := h t
_ = force S xₜ t := by
simp [force, HarmonicOscillator.force_eq_linear, toUndamped, hγ]
_ = force S xₜ t := by simp [force, HarmonicOscillator.force_eq_linear, toUndamped, hγ]

end DampedHarmonicOscillator

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@ private lemma exp_decay_smul_velocity
∂ₜ (fun t : Time => exp (-a * t.val) • y t) =
fun t : Time => exp (-a * t.val) • (∂ₜ y t - a • y t) := by
funext t
rw [Time.deriv]
rw [fderiv_fun_smul (by fun_prop) (hy t)]
rw [Time.deriv, fderiv_fun_smul (by fun_prop) (hy t)]
rw [fderiv_exp (by fun_prop), fderiv_fun_mul (by fun_prop) (by fun_prop)]
simp only [add_apply, ContinuousLinearMap.smulRight_apply,
fderiv_fun_neg, fderiv_fun_const, Pi.zero_apply, Time.fderiv_val,
Expand All @@ -197,11 +196,9 @@ private lemma exp_decay_smul_acceleration
(μ • y t - (2 * a) • ∂ₜ y t + a^2 • y t) := by
rw [exp_decay_smul_velocity a y hy]
funext t
rw [Time.deriv]
rw [fderiv_fun_smul (by fun_prop) (by fun_prop)]
rw [Time.deriv, fderiv_fun_smul (by fun_prop) (by fun_prop)]
rw [fderiv_exp (by fun_prop), fderiv_fun_mul (by fun_prop) (by fun_prop)]
rw [fderiv_fun_sub (hdy t) (by fun_prop)]
rw [fderiv_fun_const_smul (hy t)]
rw [fderiv_fun_sub (hdy t) (by fun_prop), fderiv_fun_const_smul (hy t)]
have hy''_t := congrFun hy'' t
rw [Time.deriv] at hy''_t
simp only [add_apply, _root_.sub_apply,
Expand All @@ -219,9 +216,7 @@ private lemma exp_decay_smul_equationOfMotion
(hγ : S.γ = 2 * S.m * a) (hk : S.k = S.m * (a^2 - μ)) :
S.EquationOfMotion (fun t : Time => exp (-a * t.val) • y t) := by
intro t
rw [exp_decay_smul_acceleration a μ y hy hdy hy'']
rw [exp_decay_smul_velocity a y hy]
rw [hγ, hk]
rw [exp_decay_smul_acceleration a μ y hy hdy hy'', exp_decay_smul_velocity a y hy, hγ, hk]
simp [smul_add, smul_sub, smul_smul]
module

Expand Down
3 changes: 1 addition & 2 deletions Physlib/ClassicalMechanics/EulerLagrange.lean
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ lemma eulerLagrangeOp_eq (L : Time → X → X → ℝ) (q : Time → X) :
- ∂ₜ (fun t' => gradient (L t' (q t') ·) (∂ₜ q t')) t := by rfl

lemma eulerLagrangeOp_zero (q : Time → X) :
eulerLagrangeOp (fun _ _ _ => 0) q = fun _ => 0 := by
simp [eulerLagrangeOp_eq, Time.deriv_eq]
eulerLagrangeOp (fun _ _ _ => 0) q = fun _ => 0 := by simp [eulerLagrangeOp_eq, Time.deriv_eq]

/- The variational derivative of `L t (q' t) (deriv q' t))` for a lagrangian `L`
is equal to the `eulerLagrangeOp`. -/
Expand Down
3 changes: 1 addition & 2 deletions Physlib/ClassicalMechanics/HamiltonsEquations.lean
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ noncomputable def hamiltonEqOp (H : Time → X → X → ℝ) (p : Time → X) (

lemma hamiltonEqOp_eq (H : Time → X → X → ℝ) (p : Time → X) (q : Time → X) :
hamiltonEqOp H p q = fun t => (∂ₜ q t + -gradient (fun x => H t x (q t)) (p t),
- ∂ₜ p t + -gradient (fun x => H t (p t) x) (q t)) := by
rfl
- ∂ₜ p t + -gradient (fun x => H t (p t) x) (q t)) := rfl

lemma hamiltonEqOp_eq_zero_iff_hamiltons_equations (H : Time → X → X → ℝ)
(p : Time → X) (q : Time → X) :
Expand Down
30 changes: 10 additions & 20 deletions Physlib/ClassicalMechanics/HarmonicOscillator/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@ lemma ω_pos : 0 < S.ω := sqrt_pos.mpr (div_pos S.k_pos S.m_pos)

/-- The square of the angular frequency of the classical harmonic oscillator is equal to `k/m`. -/
lemma ω_sq : S.ω^2 = S.k / S.m := by
rw [ω, sq_sqrt]
exact div_nonneg (le_of_lt S.k_pos) (le_of_lt S.m_pos)
simpa only [ω] using sq_sqrt (div_nonneg (le_of_lt S.k_pos) (le_of_lt S.m_pos))

/-- The angular frequency of the classical harmonic oscillator is not equal to zero. -/
lemma ω_ne_zero : S.ω ≠ 0 := Ne.symm (ne_of_lt S.ω_pos)
Expand Down Expand Up @@ -263,8 +262,7 @@ lemma kineticEnergy_deriv (xₜ : Time → EuclideanSpace ℝ (Fin 1)) (hx : Con
unfold kineticEnergy
conv_lhs => simp only [Time.deriv, one_div, ringHom_apply]
change (fderiv ℝ ((fun x => 2⁻¹ * S.m * ⟪x, x⟫_ℝ) ∘ (fun t => ∂ₜ xₜ t)) t) 1 = _
rw [fderiv_comp]
rw [fderiv_const_mul (by fun_prop)]
rw [fderiv_comp, fderiv_const_mul (by fun_prop)]
simp only [ContinuousLinearMap.smul_comp, FunLike.coe_smul,
ContinuousLinearMap.coe_comp, Pi.smul_apply, Function.comp_apply, smul_eq_mul]
rw [fderiv_inner_apply]
Expand All @@ -281,8 +279,7 @@ lemma potentialEnergy_deriv (xₜ : Time → EuclideanSpace ℝ (Fin 1)) (hx : C
unfold potentialEnergy
conv_lhs => simp only [Time.deriv, one_div, smul_eq_mul]
change (fderiv ℝ ((fun x => 2⁻¹ * (S.k * ⟪x, x⟫_ℝ)) ∘ (fun t => xₜ t)) t) 1 = _
rw [fderiv_comp]
rw [fderiv_const_mul (by fun_prop), fderiv_const_mul (by fun_prop)]
rw [fderiv_comp, fderiv_const_mul (by fun_prop), fderiv_const_mul (by fun_prop)]
simp only [ContinuousLinearMap.smul_comp, FunLike.coe_smul,
ContinuousLinearMap.coe_comp, Pi.smul_apply, Function.comp_apply, smul_eq_mul]
rw [fderiv_inner_apply]
Expand All @@ -302,11 +299,9 @@ lemma energy_deriv (xₜ : Time → EuclideanSpace ℝ (Fin 1)) (hx : ContDiff
∂ₜ (energy S xₜ) = fun t => ⟪∂ₜ xₜ t, S.m • ∂ₜ (∂ₜ xₜ) t + S.k • xₜ t⟫_ℝ := by
unfold energy
funext t
rw [Time.deriv_eq]
rw [fderiv_fun_add (by fun_prop) (by apply S.potentialEnergy_differentiable xₜ hx)]
rw [Time.deriv_eq, fderiv_fun_add (by fun_prop) (by apply S.potentialEnergy_differentiable xₜ hx)]
simp only [_root_.add_apply]
rw [← Time.deriv_eq, ← Time.deriv_eq]
rw [potentialEnergy_deriv, kineticEnergy_deriv]
rw [← Time.deriv_eq, ← Time.deriv_eq, potentialEnergy_deriv, kineticEnergy_deriv]
simp only
rw [← inner_add_right]
fun_prop
Expand Down Expand Up @@ -418,10 +413,8 @@ lemma gradient_const_mul_inner_self (c : ℝ) (x : EuclideanSpace ℝ (Fin 1)) :
rw [fderiv_const_mul]; fun_prop
_ = c • gradient (fun y : EuclideanSpace ℝ (Fin 1) => ⟪y, y⟫_ℝ) x := by
simp only [gradient, map_smul]
_ = c • ((2 : ℝ) • x) := by
rw [gradient_inner_self]
_ = (2 * c) • x := by
rw [smul_smul, mul_comm]
_ = c • ((2 : ℝ) • x) := by rw [gradient_inner_self]
_ = (2 * c) • x := by rw [smul_smul, mul_comm]

/-!

Expand Down Expand Up @@ -689,12 +682,9 @@ noncomputable def toCanonicalMomentum (t : Time) (x : EuclideanSpace ℝ (Fin 1)
EuclideanSpace ℝ (Fin 1) ≃ₗ[ℝ] EuclideanSpace ℝ (Fin 1) where
toFun v := gradient (S.lagrangian t x ·) v
invFun p := (1 / S.m) • p
left_inv v := by
simp [gradient_lagrangian_velocity_eq]
right_inv p := by
simp [gradient_lagrangian_velocity_eq]
map_add' v1 v2 := by
simp [gradient_lagrangian_velocity_eq]
left_inv v := by simp [gradient_lagrangian_velocity_eq]
right_inv p := by simp [gradient_lagrangian_velocity_eq]
map_add' v1 v2 := by simp [gradient_lagrangian_velocity_eq]
map_smul' c v := by
simp [gradient_lagrangian_velocity_eq]
module
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,7 @@ homeomorphism underlies the single global chart used for the smooth-manifold str
def valHomeomorphism : ConfigurationSpace ≃ₜ EuclideanSpace ℝ (Fin 1) where
toEquiv := valEquiv
continuous_toFun := continuous_induced_dom
continuous_invFun := by
apply continuous_induced_rng.mpr
exact continuous_id
continuous_invFun := continuous_induced_rng.mpr continuous_id

/-- Configuration space is Hausdorff, transported from `EuclideanSpace ℝ (Fin 1)` across the
coordinate homeomorphism. -/
Expand All @@ -148,8 +146,7 @@ chart's self-transition, which is analytic, so chart compatibility is immediate.
instance : ChartedSpace (EuclideanSpace ℝ (Fin 1)) ConfigurationSpace where
atlas := { valHomeomorphism.toOpenPartialHomeomorph }
chartAt _ := valHomeomorphism.toOpenPartialHomeomorph
mem_chart_source := by
simp
mem_chart_source := by simp
chart_mem_atlas := by
intro x
simp
Expand Down
29 changes: 9 additions & 20 deletions Physlib/ClassicalMechanics/HarmonicOscillator/Solution.lean
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,7 @@ The trajectory for zero initial conditions is the zero function.

/-- For zero initial conditions, the trajectory is zero. -/
@[simp]
lemma trajectory_zero : trajectory S 0 = fun _ => 0 := by
simp [trajectory_eq]
lemma trajectory_zero : trajectory S 0 = fun _ => 0 := by simp [trajectory_eq]

/-!

Expand Down Expand Up @@ -549,8 +548,7 @@ lemma trajectories_unique (IC : InitialConditions) (x : Time → EuclideanSpace
have hy_deriv : ∂ₜ y = fun t => ∂ₜ x t - ∂ₜ (IC.trajectory S) t :=
dsub x _ (hx.differentiable (by simp)) (hTraj.differentiable (by simp))
have hy_deriv2 : ∂ₜ (∂ₜ y) = fun t => ∂ₜ (∂ₜ x) t - ∂ₜ (∂ₜ (IC.trajectory S)) t := by
rw [hy_deriv]
exact dsub _ _ (deriv_differentiable_of_contDiff _ hx)
simpa [hy_deriv] using dsub _ _ (deriv_differentiable_of_contDiff _ hx)
(deriv_differentiable_of_contDiff _ hTraj)
have hNewt_x := (S.equationOfMotion_iff_newtons_2nd_law x hx).1 hEOM
have hNewt_traj := (S.equationOfMotion_iff_newtons_2nd_law (IC.trajectory S) hTraj).1
Expand Down Expand Up @@ -1000,8 +998,7 @@ lemma trajectory_velocity_eq_zero_iff_exists_int (IC : InitialConditions)
linarith
calc
(t : ℝ) = (S.ω * t) / S.ω := by field_simp [hω]
_ = ((AmplitudePhase.fromInitialConditions S IC).φ + n * π) / S.ω := by
rw [ht]
_ = ((AmplitudePhase.fromInitialConditions S IC).φ + n * π) / S.ω := by rw [ht]
· intro h
obtain ⟨n, hn⟩ := h
rw [Real.sin_eq_zero_iff]
Expand Down Expand Up @@ -1039,8 +1036,7 @@ lemma trajectory_velocity_eq_zero_iff_norm_eq_amplitude (IC : InitialConditions)
ext i
fin_cases i
simp [hA]
rw [trajectory_velocity_eq_zero_iff_sin_eq_zero S IC hA t]
rw [trajectory_eq_cos]
rw [trajectory_velocity_eq_zero_iff_sin_eq_zero S IC hA t, trajectory_eq_cos]
set A := (AmplitudePhase.fromInitialConditions S IC).A
set θ := S.ω * t.val - (AmplitudePhase.fromInitialConditions S IC).φ
show sin θ = 0 ↔ ‖EuclideanSpace.single 0 (A * cos θ)‖ = A
Expand All @@ -1055,8 +1051,7 @@ lemma trajectory_velocity_eq_zero_iff_norm_eq_amplitude (IC : InitialConditions)
· simp [hcos, abs_of_pos hA_pos]
· simp [hcos, abs_of_pos hA_pos]
· intro hnorm
have hnorm' : |A * cos θ| = A := by
simpa using hnorm
have hnorm' : |A * cos θ| = A := by simpa using hnorm
have hcos_abs : |cos θ| = 1 := by
calc
|cos θ| = |A * cos θ| / A := by
Expand Down Expand Up @@ -1118,8 +1113,7 @@ lemma trajectory_eq_zero_iff_exists_int (IC : InitialConditions)
linarith
calc
(t : ℝ) = (S.ω * t) / S.ω := by field_simp [hω]
_ = ((AmplitudePhase.fromInitialConditions S IC).φ + (2 * n + 1) * π / 2) / S.ω := by
rw [ht]
_ = ((AmplitudePhase.fromInitialConditions S IC).φ + (2 * n + 1) * π / 2) / S.ω := by rw [ht]
· intro h
obtain ⟨n, hn⟩ := h
rw [Real.cos_eq_zero_iff]
Expand Down Expand Up @@ -1182,8 +1176,7 @@ lemma trajectory_periodic (IC : InitialConditions) :
have h : S.ω * (t.val + 2 * π / S.ω) = S.ω * t.val + 2 * π := by
have := S.ω_ne_zero
ring_nf; field_simp
rw [InitialConditions.trajectory, add_val, period_eq, h, cos_add_two_pi, sin_add_two_pi]
rfl
simp [InitialConditions.trajectory, add_val, period_eq, h, cos_add_two_pi, sin_add_two_pi]

/-!

Expand Down Expand Up @@ -1217,18 +1210,14 @@ lemma return_time (IC : InitialConditions) (non_trivial : IC.x₀ ≠ 0 ∨ IC.v
have zero_lt_det : 0 < det := by
cases non_trivial with
| inl hx =>
have xx_gt_zero : 0 < xx := by
apply real_inner_self_pos.mpr
exact hx
have xx_gt_zero : 0 < xx := real_inner_self_pos.mpr hx
calc
0 < xx * S.ω^2 := by bound
_ ≤ ‖IC.v₀‖^2 + xx * S.ω^2 := by bound
_ = vv + xx * S.ω^2 := by rw [← real_inner_self_eq_norm_sq IC.v₀]
_ = det := by rfl
| inr hv =>
have vv_gt_zero : 0 < vv := by
apply real_inner_self_pos.mpr
exact hv
have vv_gt_zero : 0 < vv := real_inner_self_pos.mpr hv
calc
0 < vv := vv_gt_zero
_ ≤ vv + ‖IC.x₀‖^2 * S.ω^2 := by bound
Expand Down
Loading
Loading