Proof Assistant Projects
Collection
Digesting proof assistant libraries for AI ingestion. β’ 103 items β’ Updated β’ 4
statement stringlengths 1 1.98k | proof stringlengths 0 15.3k | type stringclasses 10
values | symbolic_name stringlengths 1 117 | library stringclasses 156
values | filename stringclasses 526
values | imports listlengths 0 7 | deps listlengths 0 64 | docstring stringlengths 0 2.13k | source_url stringclasses 1
value | commit stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|
AdmissibleVariation (d : β) (U : Type*) [NormedAddCommGroup U] [NormedSpace β U] where
/-- The underlying variation function. -/
toFun : Space d β U
/-- Smoothness and compact support of the variation. -/
isTestFunction : IsTestFunction toFun | structure | ClassicalFieldTheory.Local.AdmissibleVariation | ClassicalFieldTheory.Local | Physlib/ClassicalFieldTheory/Local/Variation.lean | [] | [
"IsTestFunction",
"Space"
] | An admissible local variation is a smooth compactly supported map `Space d β U`. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
hasCompactSupport (Ξ· : AdmissibleVariation d U) : HasCompactSupport (Ξ·.toFun) | Ξ·.isTestFunction.supp | lemma | ClassicalFieldTheory.Local.AdmissibleVariation.hasCompactSupport | ClassicalFieldTheory.Local | Physlib/ClassicalFieldTheory/Local/Variation.lean | [] | [] | An admissible variation has compact support. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
toCompactlySupportedContinuousMap (Ξ· : AdmissibleVariation d U) :
CompactlySupportedContinuousMap (Space d) U | Ξ·.isTestFunction.toCompactlySupportedContinuousMap | def | ClassicalFieldTheory.Local.AdmissibleVariation.toCompactlySupportedContinuousMap | ClassicalFieldTheory.Local | Physlib/ClassicalFieldTheory/Local/Variation.lean | [] | [
"Space"
] | View an admissible variation as a compactly supported continuous map. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
zero_apply (x : Space d) : (0 : AdmissibleVariation d U) x = 0 | rfl | lemma | ClassicalFieldTheory.Local.AdmissibleVariation.zero_apply | ClassicalFieldTheory.Local | Physlib/ClassicalFieldTheory/Local/Variation.lean | [] | [
"Space"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
neg_apply (Ξ· : AdmissibleVariation d U) (x : Space d) : (-Ξ·) x = -Ξ· x | rfl | lemma | ClassicalFieldTheory.Local.AdmissibleVariation.neg_apply | ClassicalFieldTheory.Local | Physlib/ClassicalFieldTheory/Local/Variation.lean | [] | [
"Space"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
add_apply (Ξ· ΞΎ : AdmissibleVariation d U) (x : Space d) : (Ξ· + ΞΎ) x = Ξ· x + ΞΎ x | rfl | lemma | ClassicalFieldTheory.Local.AdmissibleVariation.add_apply | ClassicalFieldTheory.Local | Physlib/ClassicalFieldTheory/Local/Variation.lean | [] | [
"Space"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
sub_apply (Ξ· ΞΎ : AdmissibleVariation d U) (x : Space d) : (Ξ· - ΞΎ) x = Ξ· x - ΞΎ x | rfl | lemma | ClassicalFieldTheory.Local.AdmissibleVariation.sub_apply | ClassicalFieldTheory.Local | Physlib/ClassicalFieldTheory/Local/Variation.lean | [] | [
"Space"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
smul_apply (c : β) (Ξ· : AdmissibleVariation d U) (x : Space d) :
(c β’ Ξ·) x = c β’ Ξ· x | rfl | lemma | ClassicalFieldTheory.Local.AdmissibleVariation.smul_apply | ClassicalFieldTheory.Local | Physlib/ClassicalFieldTheory/Local/Variation.lean | [] | [
"Space"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
coord {m : β} (Ξ· : AdmissibleVariation d (Space m)) (a : Fin m) :
IsTestFunction (fun x => (Ξ·.toFun x).coord a) | by
simpa [Space.coord] using IsTestFunction.coord Ξ·.isTestFunction a | lemma | ClassicalFieldTheory.Local.AdmissibleVariation.coord | ClassicalFieldTheory.Local | Physlib/ClassicalFieldTheory/Local/Variation.lean | [] | [
"IsTestFunction",
"IsTestFunction.coord",
"Space",
"Space.coord"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
eulerLagrangeOp (L : Time β X β X β β) (q : Time β X) : Time β X | fun t =>
gradient (L t Β· (ββ q t)) (q t) - ββ (fun t' => gradient (L t' (q t') Β·) (ββ q t')) t | def | ClassicalMechanics.eulerLagrangeOp | ClassicalMechanics | Physlib/ClassicalMechanics/EulerLagrange.lean | [] | [
"Time"
] | The Euler Lagrange operator, for a trajectory `q : Time β X`,
and a lagrangian `Time β X β X β β`, the Euler-Lagrange operator is
`βL/βq - dβ(βL/β(dβ q))`. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
eulerLagrangeOp_eq (L : Time β X β X β β) (q : Time β X) :
eulerLagrangeOp L q = fun t => gradient (L t Β· (ββ q t)) (q t)
- ββ (fun t' => gradient (L t' (q t') Β·) (ββ q t')) t | by rfl | lemma | ClassicalMechanics.eulerLagrangeOp_eq | ClassicalMechanics | Physlib/ClassicalMechanics/EulerLagrange.lean | [] | [
"Time"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
eulerLagrangeOp_zero (q : Time β X) :
eulerLagrangeOp (fun _ _ _ => 0) q = fun _ => 0 | by
simp [eulerLagrangeOp_eq, Time.deriv_eq] | lemma | ClassicalMechanics.eulerLagrangeOp_zero | ClassicalMechanics | Physlib/ClassicalMechanics/EulerLagrange.lean | [] | [
"Time",
"Time.deriv_eq"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
euler_lagrange_varGradient
(L : Time β X β X β β) (q : Time β X)
(hq : ContDiff β β q) (hL : ContDiff β β βΏL) :
(Ξ΄ (q':=q), β« t, L t (q' t) (fderiv β q' t 1)) = eulerLagrangeOp L q | by
rw [eulerLagrangeOp_eq]
simp only [Time.deriv_eq]
apply HasVarGradientAt.varGradient
apply HasVarGradientAt.intro _
Β· apply HasVarAdjDerivAt.comp
(F := fun (Ο : Time β X Γ X) t => L t (Ο t).fst (Ο t).snd)
(G := fun (Ο : Time β X) t => (Ο t, fderiv β Ο t 1))
Β· apply HasVarAdjDerivAt.fmap (f ... | theorem | ClassicalMechanics.euler_lagrange_varGradient | ClassicalMechanics | Physlib/ClassicalMechanics/EulerLagrange.lean | [] | [
"DifferentiableAt.hasAdjFDerivAt",
"HasVarAdjDerivAt.comp",
"HasVarAdjDerivAt.fderiv",
"HasVarAdjDerivAt.fmap",
"HasVarAdjDerivAt.id",
"HasVarAdjDerivAt.prod",
"HasVarGradientAt.varGradient",
"Time",
"Time.deriv_eq",
"adjFDeriv_uncurry",
"gradient_eq_adjFDeriv"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
hamiltonEqOp (H : Time β X β X β β) (p : Time β X) (q : Time β X) :
Time β X Γ X | 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)) | def | ClassicalMechanics.hamiltonEqOp | ClassicalMechanics | Physlib/ClassicalMechanics/HamiltonsEquations.lean | [] | [
"Time"
] | Given a hamiltonian `H : Time β X β X β β` the operator which when
set to zero implies the Hamilton equations. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
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 | lemma | ClassicalMechanics.hamiltonEqOp_eq | ClassicalMechanics | Physlib/ClassicalMechanics/HamiltonsEquations.lean | [] | [
"Time"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
hamiltonEqOp_eq_zero_iff_hamiltons_equations (H : Time β X β X β β)
(p : Time β X) (q : Time β X) :
hamiltonEqOp H p q = 0 β
(β t, ββ q t = gradient (fun x => H t x (q t)) (p t)) β§
(β t, ββ p t = -gradient (fun x => H t (p t) x) (q t)) | by
simp [hamiltonEqOp_eq]
simp_all only [Time.deriv_eq]
rw [funext_iff]
simp_all only [Pi.zero_apply, Prod.mk_eq_zero]
apply Iff.intro
Β· intro h1
apply And.intro
Β· intro t
conv_rhs =>
rw [β add_zero (gradient (fun x => H t x (q t)) (p t)), β (h1 t).1]
simp
Β· intro t
con... | lemma | ClassicalMechanics.hamiltonEqOp_eq_zero_iff_hamiltons_equations | ClassicalMechanics | Physlib/ClassicalMechanics/HamiltonsEquations.lean | [] | [
"Time",
"Time.deriv_eq"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
hamiltons_equations_varGradient
(H : Time β X β X β β) (pq : Time β X Γ X) (hp : ContDiff β β pq)
(hL : ContDiff β β βΏH) :
(Ξ΄ (pq':= pq), β« t, βͺ(pq' t).1, ββ (Prod.snd β pq') tβ«_β - H t (pq' t).1 (pq' t).2) =
fun t => hamiltonEqOp H (fun t => (pq t).1) (fun t => (pq t).2) t | by
apply HasVarGradientAt.varGradient
apply HasVarGradientAt.intro _
Β· apply HasVarAdjDerivAt.add
Β· let i := fun (t : Time) (x : X Γ X) => βͺx.1, x.2β«_β
apply HasVarAdjDerivAt.comp
(F := fun (Ο : Time β X Γ X) t => i t (Ο t))
(G := fun (Ο : Time β X Γ X) t => ((Ο t).1, fderiv β (Prod.snd ... | theorem | ClassicalMechanics.hamiltons_equations_varGradient | ClassicalMechanics | Physlib/ClassicalMechanics/HamiltonsEquations.lean | [] | [
"DifferentiableAt.hasAdjFDerivAt",
"HasVarAdjDerivAt",
"HasVarAdjDerivAt.add",
"HasVarAdjDerivAt.comp",
"HasVarAdjDerivAt.fderiv'",
"HasVarAdjDerivAt.fmap",
"HasVarAdjDerivAt.fst",
"HasVarAdjDerivAt.id",
"HasVarAdjDerivAt.neg",
"HasVarAdjDerivAt.prod",
"HasVarGradientAt.varGradient",
"Time",
... | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
DampedHarmonicOscillator extends HarmonicOscillator where
/-- The damping coefficient of the oscillator. -/
Ξ³ : β
/-- The damping coefficient is nonnegative. -/
Ξ³_nonneg : 0 β€ Ξ³ | structure | ClassicalMechanics.DampedHarmonicOscillator | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | The classical damped harmonic oscillator is specified by a mass `m`, a spring
constant `k`, and a damping coefficient `Ξ³`.
The mass and spring constant are inherited from `HarmonicOscillator` and are positive.
The damping coefficient is assumed to be nonnegative. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
EquationOfMotion (xβ : Time β EuclideanSpace β (Fin 1)) : Prop | β t : Time, S.m β’ ββ (ββ xβ) t + S.Ξ³ β’ ββ xβ t + S.k β’ xβ t = 0 | def | ClassicalMechanics.DampedHarmonicOscillator.EquationOfMotion | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [
"Time"
] | The equation of motion for the damped harmonic oscillator:
`m αΊ + Ξ³ αΊ + k x = 0`. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
energy_dissipation_rate (xβ : Time β EuclideanSpace β (Fin 1)) (t : Time)
(h1 : S.EquationOfMotion xβ)
(hx : ContDiff β β xβ) :
ββ (S.energy xβ) t = - S.Ξ³ * βͺββ xβ t, ββ xβ tβ«_β | by
rw [S.energy_deriv xβ hx]
simp only
have heom := h1 t
have hforce : S.m β’ ββ (ββ xβ) t + S.k β’ xβ t = - S.Ξ³ β’ ββ xβ t := by
have hsum : (S.m β’ ββ (ββ xβ) t + S.k β’ xβ t) + S.Ξ³ β’ ββ xβ t = 0 := by
simpa [add_assoc, add_left_comm, add_comm] using heom
simpa [neg_smul] using eq_neg_of_add_eq_zero_... | lemma | ClassicalMechanics.DampedHarmonicOscillator.energy_dissipation_rate | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [
"Time"
] | Along a smooth solution of the damped equation of motion, the derivative of the
mechanical energy is `-Ξ³ βαΊβ^2`. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
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)) | lemma | ClassicalMechanics.DampedHarmonicOscillator.energy_not_conserved | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [
"Time"
] | If `0 < Ξ³` and the velocity is nonzero at a time, the mechanical energy is strictly
decreasing at that time. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
force (S : DampedHarmonicOscillator)
(xβ : Time β EuclideanSpace β (Fin 1)) (t : Time) :
EuclideanSpace β (Fin 1) | - S.k β’ xβ t - S.Ξ³ β’ ββ xβ t | def | ClassicalMechanics.DampedHarmonicOscillator.force | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [
"Time"
] | The force of the damped harmonic oscillator at a given position and time. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
equationOfMotion_iff_newtons_2nd_law (xβ : Time β EuclideanSpace β (Fin 1)) :
S.EquationOfMotion xβ β
(β t : Time, S.m β’ ββ (ββ xβ) t = force S xβ t) | by
simp only [EquationOfMotion, force]
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
have ha :
S.m β’ ββ (ββ xβ) t = -(S.Ξ³ β’ ββ xβ t + S.k β’ xβ t) :=
eq_neg_of_add_eq_zero_left h'
simpa [sub_eq_add_n... | lemma | ClassicalMechanics.DampedHarmonicOscillator.equationOfMotion_iff_newtons_2nd_law | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [
"Time"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
discriminant : β | S.Ξ³^2 - 4 * S.m * S.k | def | ClassicalMechanics.DampedHarmonicOscillator.discriminant | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | The discriminant that determines the damping regime. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
decayRate : β | S.Ξ³ / (2 * S.m) | def | ClassicalMechanics.DampedHarmonicOscillator.decayRate | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | The exponential decay rate `Ξ³ / (2 * m)`. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
IsUnderdamped : Prop | S.discriminant < 0 | def | ClassicalMechanics.DampedHarmonicOscillator.IsUnderdamped | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | The system is underdamped when Ξ³Β² < 4mk. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
IsCriticallyDamped : Prop | S.discriminant = 0 | def | ClassicalMechanics.DampedHarmonicOscillator.IsCriticallyDamped | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | The system is critically damped when Ξ³Β² = 4mk. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
IsOverdamped : Prop | 0 < S.discriminant | def | ClassicalMechanics.DampedHarmonicOscillator.IsOverdamped | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | The system is overdamped when 4mk < Ξ³Β². | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
IsUndamped : Prop | S.Ξ³ = 0 | def | ClassicalMechanics.DampedHarmonicOscillator.IsUndamped | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | The system is undamped when Ξ³ = 0. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
angularFrequency : β | by
classical
exact
if S.IsUnderdamped then
sqrt (- S.discriminant) / (2 * S.m)
else if S.IsCriticallyDamped then
0
else
sqrt S.discriminant / (2 * S.m) | def | ClassicalMechanics.DampedHarmonicOscillator.angularFrequency | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | The real frequency selected by the damping regime.
In the underdamped regime this is the oscillation frequency. In the critically damped
regime it is `0`. In the overdamped regime this is the real split rate between the two
roots. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
discriminant_eq_four_mul_m_sq_mul_decayRate_sq_sub_Ο_sq :
S.discriminant = 4 * S.m^2 * (S.decayRate^2 - S.Ο^2) | by
rw [discriminant, decayRate, S.Ο_sq]
field_simp [S.m_ne_zero]
ring | lemma | ClassicalMechanics.DampedHarmonicOscillator.discriminant_eq_four_mul_m_sq_mul_decayRate_sq_sub_Ο_sq | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | The relationship between the discriminant, decay rate, and natural angular frequency. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
decayRate_nonneg : 0 β€ S.decayRate | by
rw [decayRate]
exact div_nonneg S.Ξ³_nonneg (by nlinarith [S.m_pos]) | lemma | ClassicalMechanics.DampedHarmonicOscillator.decayRate_nonneg | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | The decay rate is nonnegative. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
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Ξ³]
ring_nf
nlinarith [sq_pos_of_pos S.m_pos, sq_pos_of_pos S.Ο_pos] | lemma | ClassicalMechanics.DampedHarmonicOscillator.isUnderdamped_of_gamma_eq_zero | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | An undamped oscillator lies in the underdamped regime. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
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
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
nlinarith [S.decayRate_nonneg, S.Ο_pos] | lemma | ClassicalMechanics.DampedHarmonicOscillator.isUnderdamped_decayRate | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | An underdamped system has decay rate less than the natural frequency. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
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
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 ... | lemma | ClassicalMechanics.DampedHarmonicOscillator.isCriticallyDamped_decayRate | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | A critically damped system has decay rate equal to the natural frequency. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
gamma_eq_two_mul_m_mul_decayRate : S.Ξ³ = 2 * S.m * S.decayRate | by
rw [decayRate]
field_simp [S.m_ne_zero] | lemma | ClassicalMechanics.DampedHarmonicOscillator.gamma_eq_two_mul_m_mul_decayRate | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | The damping coefficient is twice mass times the decay rate. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
k_eq_m_mul_Ο_sq : S.k = S.m * S.Ο^2 | by
rw [S.Ο_sq]
field_simp [S.m_ne_zero] | lemma | ClassicalMechanics.DampedHarmonicOscillator.k_eq_m_mul_Ο_sq | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | The spring constant is `m * Ο^2`. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
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
field_simp [S.m_ne_zero] at hΟsq
nlinarith | lemma | ClassicalMechanics.DampedHarmonicOscillator.k_eq_m_mul_decayRate_sq_of_criticallyDamped | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | In the critically damped regime, `k = m * decayRate^2`. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
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
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
nlinarith [S.decayRate_nonneg, S.Ο_pos] | lemma | ClassicalMechanics.DampedHarmonicOscillator.isOverdamped_decayRate | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | An overdamped system has decay rate greater than the natural frequency. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
angularFrequency_eq_underdamped (hS : S.IsUnderdamped) :
S.angularFrequency = sqrt (- S.discriminant) / (2 * S.m) | by
classical
simp [angularFrequency, hS] | lemma | ClassicalMechanics.DampedHarmonicOscillator.angularFrequency_eq_underdamped | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | In the underdamped regime, the selected frequency uses the oscillation frequency. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
angularFrequency_eq_criticallyDamped (hS : S.IsCriticallyDamped) :
S.angularFrequency = 0 | by
classical
have hnotUnder : Β¬ S.IsUnderdamped := by
intro hUnder
rw [IsUnderdamped] at hUnder
rw [IsCriticallyDamped] at hS
linarith
simp [angularFrequency, hnotUnder, hS] | lemma | ClassicalMechanics.DampedHarmonicOscillator.angularFrequency_eq_criticallyDamped | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | In the critically damped regime, the selected frequency is zero. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
angularFrequency_eq_overdamped (hS : S.IsOverdamped) :
S.angularFrequency = sqrt S.discriminant / (2 * S.m) | by
classical
have hnotUnder : Β¬ S.IsUnderdamped := by
intro hUnder
rw [IsUnderdamped] at hUnder
rw [IsOverdamped] at hS
linarith
have hnotCritical : Β¬ S.IsCriticallyDamped := by
intro hCritical
rw [IsCriticallyDamped] at hCritical
rw [IsOverdamped] at hS
linarith
simp [angularFre... | lemma | ClassicalMechanics.DampedHarmonicOscillator.angularFrequency_eq_overdamped | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | In the overdamped regime, the selected frequency uses the real split rate. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
angularFrequency_sq_of_underdamped (hS : S.IsUnderdamped) :
S.angularFrequency^2 = S.Ο^2 - S.decayRate^2 | by
rw [S.angularFrequency_eq_underdamped hS, div_pow, sq_sqrt]
Β· rw [discriminant_eq_four_mul_m_sq_mul_decayRate_sq_sub_Ο_sq]
field_simp [S.m_ne_zero]
ring
Β· rw [IsUnderdamped] at hS
exact le_of_lt (neg_pos.mpr hS) | lemma | ClassicalMechanics.DampedHarmonicOscillator.angularFrequency_sq_of_underdamped | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | In the underdamped regime, the selected angular frequency squares to
`Ο^2 - decayRate^2`. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
angularFrequency_pos_of_underdamped (hS : S.IsUnderdamped) :
0 < S.angularFrequency | by
rw [S.angularFrequency_eq_underdamped hS]
apply div_pos
Β· rw [IsUnderdamped] at hS
exact sqrt_pos.mpr (neg_pos.mpr hS)
Β· nlinarith [S.m_pos] | lemma | ClassicalMechanics.DampedHarmonicOscillator.angularFrequency_pos_of_underdamped | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | The selected angular frequency is positive in the underdamped regime. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
angularFrequency_ne_zero_of_underdamped (hS : S.IsUnderdamped) :
S.angularFrequency β 0 | Ne.symm (ne_of_lt (S.angularFrequency_pos_of_underdamped hS)) | lemma | ClassicalMechanics.DampedHarmonicOscillator.angularFrequency_ne_zero_of_underdamped | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | The selected angular frequency is nonzero in the underdamped regime. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
angularFrequency_sq_of_overdamped (hS : S.IsOverdamped) :
S.angularFrequency^2 = S.decayRate^2 - S.Ο^2 | by
rw [S.angularFrequency_eq_overdamped hS, div_pow, sq_sqrt]
Β· rw [discriminant_eq_four_mul_m_sq_mul_decayRate_sq_sub_Ο_sq]
field_simp [S.m_ne_zero]
ring
Β· rw [IsOverdamped] at hS
exact le_of_lt hS | lemma | ClassicalMechanics.DampedHarmonicOscillator.angularFrequency_sq_of_overdamped | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | In the overdamped regime, the selected angular frequency squares to
`decayRate^2 - Ο^2`. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
angularFrequency_pos_of_overdamped (hS : S.IsOverdamped) :
0 < S.angularFrequency | by
rw [S.angularFrequency_eq_overdamped hS]
apply div_pos
Β· rw [IsOverdamped] at hS
exact sqrt_pos.mpr hS
Β· nlinarith [S.m_pos] | lemma | ClassicalMechanics.DampedHarmonicOscillator.angularFrequency_pos_of_overdamped | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | The selected angular frequency is positive in the overdamped regime. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
angularFrequency_ne_zero_of_overdamped (hS : S.IsOverdamped) :
S.angularFrequency β 0 | Ne.symm (ne_of_lt (S.angularFrequency_pos_of_overdamped hS)) | lemma | ClassicalMechanics.DampedHarmonicOscillator.angularFrequency_ne_zero_of_overdamped | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | The selected angular frequency is nonzero in the overdamped regime. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
toUndamped (S : DampedHarmonicOscillator) (_hS : S.IsUndamped) :
HarmonicOscillator | S.toHarmonicOscillator | def | ClassicalMechanics.DampedHarmonicOscillator.toUndamped | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [] | Convert a damped oscillator to its underlying undamped oscillator when `Ξ³ = 0`. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
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
rw [S.equationOfMotion_iff_newtons_2nd_law xβ,
(S.toUndamped hS).equationOfMotion_iff_newtons_2nd_law xβ hx]
constructor
Β· intro h t
calc
(S.toUndamped hS).m β’ ββ (ββ xβ) t = S.m β’ ββ (ββ xβ) t := rfl
_ = force S xβ t := h t
_ ... | lemma | ClassicalMechanics.DampedHarmonicOscillator.toUndamped_equationOfMotion | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Basic.lean | [] | [
"Time"
] | When `Ξ³ = 0`, the damped equation of motion is equivalent to the equation of motion
for the corresponding undamped harmonic oscillator. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
InitialConditions where
/-- The initial position of the damped harmonic oscillator. -/
xβ : EuclideanSpace β (Fin 1)
/-- The initial velocity of the damped harmonic oscillator. -/
vβ : EuclideanSpace β (Fin 1) | structure | ClassicalMechanics.DampedHarmonicOscillator.InitialConditions | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Solution.lean | [] | [] | The initial conditions for the damped harmonic oscillator, specified by an initial
position and an initial velocity. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
underdampedBase
(IC : InitialConditions) : Time β EuclideanSpace β (Fin 1) | fun t =>
cos (S.angularFrequency * t) β’ IC.xβ
+ (sin (S.angularFrequency * t)/S.angularFrequency) β’
(IC.vβ + S.decayRate β’ IC.xβ) | def | ClassicalMechanics.DampedHarmonicOscillator.underdampedBase | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Solution.lean | [] | [
"Time"
] | The oscillatory part of the underdamped trajectory before exponential decay. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
criticallyDampedBase
(IC : InitialConditions) : Time β EuclideanSpace β (Fin 1) | fun t =>
IC.xβ + (t : β) β’ (IC.vβ + S.decayRate β’ IC.xβ) | def | ClassicalMechanics.DampedHarmonicOscillator.criticallyDampedBase | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Solution.lean | [] | [
"Time"
] | The polynomial part of the critically damped trajectory before exponential decay. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
overdampedBase
(IC : InitialConditions) : Time β EuclideanSpace β (Fin 1) | fun t =>
cosh (S.angularFrequency * t) β’ IC.xβ
+ (sinh (S.angularFrequency * t) / S.angularFrequency) β’
(IC.vβ + S.decayRate β’ IC.xβ) | def | ClassicalMechanics.DampedHarmonicOscillator.overdampedBase | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Solution.lean | [] | [
"Time"
] | The hyperbolic part of the overdamped trajectory before exponential decay. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
trajectory
(IC : InitialConditions) : Time β EuclideanSpace β (Fin 1) | by
classical
exact
if S.IsUnderdamped then
fun t : Time => exp (-S.decayRate * t) β’ S.underdampedBase IC t
else if S.IsCriticallyDamped then
fun t : Time => exp (-S.decayRate * t) β’ S.criticallyDampedBase IC t
else
fun t : Time => exp (-S.decayRate * t) β’ S.overdampedBase IC t | def | ClassicalMechanics.DampedHarmonicOscillator.trajectory | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Solution.lean | [] | [
"Time"
] | Given initial conditions, the solution selected from the damping regime of the
oscillator. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
trajectory_eq_of_underdamped (IC : InitialConditions) (hS : S.IsUnderdamped) :
S.trajectory IC =
fun t : Time => exp (-S.decayRate * t) β’ S.underdampedBase IC t | by
classical
simp [trajectory, hS] | lemma | ClassicalMechanics.DampedHarmonicOscillator.trajectory_eq_of_underdamped | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Solution.lean | [] | [
"Time"
] | In the underdamped regime, the selected trajectory uses the trigonometric base. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
trajectory_eq_of_criticallyDamped (IC : InitialConditions) (hS : S.IsCriticallyDamped) :
S.trajectory IC =
fun t : Time => exp (-S.decayRate * t) β’ S.criticallyDampedBase IC t | by
classical
have hnotUnder : Β¬ S.IsUnderdamped := by
intro hUnder
rw [IsUnderdamped] at hUnder
rw [IsCriticallyDamped] at hS
linarith
simp [trajectory, hnotUnder, hS] | lemma | ClassicalMechanics.DampedHarmonicOscillator.trajectory_eq_of_criticallyDamped | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Solution.lean | [] | [
"Time"
] | In the critically damped regime, the selected trajectory uses the polynomial base. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
trajectory_eq_of_overdamped (IC : InitialConditions) (hS : S.IsOverdamped) :
S.trajectory IC =
fun t : Time => exp (-S.decayRate * t) β’ S.overdampedBase IC t | by
classical
have hnotUnder : Β¬ S.IsUnderdamped := by
intro hUnder
rw [IsUnderdamped] at hUnder
rw [IsOverdamped] at hS
linarith
have hnotCritical : Β¬ S.IsCriticallyDamped := by
intro hCritical
rw [IsCriticallyDamped] at hCritical
rw [IsOverdamped] at hS
linarith
simp [trajectory... | lemma | ClassicalMechanics.DampedHarmonicOscillator.trajectory_eq_of_overdamped | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Solution.lean | [] | [
"Time"
] | In the overdamped regime, the selected trajectory uses the hyperbolic base. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
exp_decay_smul_velocity
(a : β) (y : Time β EuclideanSpace β (Fin 1)) (hy : Differentiable β y) :
ββ (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 [fderiv_exp (by fun_prop), fderiv_fun_mul (by fun_prop) (by fun_prop)]
simp only [ContinuousLinearMap.add_apply, ContinuousLinearMap.smulRight_apply,
fderiv_fun_neg, fderiv_fun_const, Pi.zero_apply, Time.fderiv_val,
ContinuousLin... | lemma | ClassicalMechanics.DampedHarmonicOscillator.exp_decay_smul_velocity | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Solution.lean | [] | [
"Time",
"Time.deriv",
"Time.deriv_eq",
"Time.fderiv_val"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
exp_decay_smul_acceleration
(a ΞΌ : β) (y : Time β EuclideanSpace β (Fin 1))
(hy : Differentiable β y) (hdy : Differentiable β (ββ y))
(hy'' : ββ (ββ y) = fun t => ΞΌ β’ y t) :
ββ (ββ (fun t : Time => exp (-a * t.val) β’ y t)) =
fun t : Time => exp (-a * t.val) β’
(ΞΌ β’ y t - (2 * a) β’ ββ 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 [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)]
have hy''_t := congrFun hy'' t
rw [Time... | lemma | ClassicalMechanics.DampedHarmonicOscillator.exp_decay_smul_acceleration | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Solution.lean | [] | [
"Time",
"Time.deriv",
"Time.deriv_eq",
"Time.fderiv_val"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
exp_decay_smul_equationOfMotion
(a ΞΌ : β) (y : Time β EuclideanSpace β (Fin 1))
(hy : Differentiable β y) (hdy : Differentiable β (ββ y))
(hy'' : ββ (ββ y) = fun t => ΞΌ β’ y t)
(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]
simp [smul_add, smul_sub, smul_smul]
module | lemma | ClassicalMechanics.DampedHarmonicOscillator.exp_decay_smul_equationOfMotion | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Solution.lean | [] | [
"Time"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
criticallyDampedBase_velocity (IC : InitialConditions) :
ββ (S.criticallyDampedBase IC) =
fun _ : Time => IC.vβ + S.decayRate β’ IC.xβ | by
funext t
change ββ (fun t : Time =>
IC.xβ + t.val β’ (IC.vβ + S.decayRate β’ IC.xβ)) t = _
rw [Time.deriv]
rw [fderiv_fun_add (by fun_prop) (by fun_prop)]
rw [fderiv_fun_const]
rw [fderiv_smul_const (by fun_prop)]
simp | lemma | ClassicalMechanics.DampedHarmonicOscillator.criticallyDampedBase_velocity | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Solution.lean | [] | [
"Time",
"Time.deriv"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
criticallyDampedBase_acceleration (IC : InitialConditions) :
ββ (ββ (S.criticallyDampedBase IC)) =
fun _ => (0 : EuclideanSpace β (Fin 1)) | by
rw [criticallyDampedBase_velocity]
funext t
simp | lemma | ClassicalMechanics.DampedHarmonicOscillator.criticallyDampedBase_acceleration | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Solution.lean | [] | [] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
underdampedBase_velocity (IC : InitialConditions) (hS : S.IsUnderdamped) :
ββ (fun t : Time =>
cos (S.angularFrequency * t.val) β’ IC.xβ +
(sin (S.angularFrequency * t.val) / S.angularFrequency) β’
(IC.vβ + S.decayRate β’ IC.xβ)) =
fun t : Time =>
(-S.angularFrequency * sin (S.angular... | by
funext t
rw [Time.deriv]
rw [fderiv_fun_add (by fun_prop) (by fun_prop)]
rw [fderiv_smul_const (by fun_prop)]
rw [fderiv_smul_const (by fun_prop)]
have hΞ© : S.angularFrequency β 0 := S.angularFrequency_ne_zero_of_underdamped hS
have hcos :
(fderiv β (fun y : Time => cos (S.angularFrequency * y.va... | lemma | ClassicalMechanics.DampedHarmonicOscillator.underdampedBase_velocity | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Solution.lean | [] | [
"Time",
"Time.deriv"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
underdampedBase_acceleration (IC : InitialConditions) (hS : S.IsUnderdamped) :
ββ (ββ (fun t : Time =>
cos (S.angularFrequency * t.val) β’ IC.xβ +
(sin (S.angularFrequency * t.val) / S.angularFrequency) β’
(IC.vβ + S.decayRate β’ IC.xβ))) =
fun t : Time => -S.angularFrequency^2 β’
(cos... | by
funext t
rw [S.underdampedBase_velocity IC hS]
rw [Time.deriv]
rw [fderiv_fun_add (by fun_prop) (by fun_prop)]
rw [fderiv_smul_const (by fun_prop)]
rw [fderiv_smul_const (by fun_prop)]
have hΞ© : S.angularFrequency β 0 := S.angularFrequency_ne_zero_of_underdamped hS
have hsin :
(fderiv β (fun y ... | lemma | ClassicalMechanics.DampedHarmonicOscillator.underdampedBase_acceleration | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Solution.lean | [] | [
"Time",
"Time.deriv"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
overdampedBase_velocity (IC : InitialConditions) (hS : S.IsOverdamped) :
ββ (fun t : Time =>
cosh (S.angularFrequency * t.val) β’ IC.xβ +
(sinh (S.angularFrequency * t.val) / S.angularFrequency) β’
(IC.vβ + S.decayRate β’ IC.xβ)) =
fun t : Time =>
(S.angularFrequency * sinh (S.angular... | by
funext t
rw [Time.deriv]
rw [fderiv_fun_add (by fun_prop) (by fun_prop)]
rw [fderiv_smul_const (by fun_prop)]
rw [fderiv_smul_const (by fun_prop)]
have hLambda : S.angularFrequency β 0 := S.angularFrequency_ne_zero_of_overdamped hS
have hcosh :
(fderiv β (fun y : Time => cosh (S.angularFrequency ... | lemma | ClassicalMechanics.DampedHarmonicOscillator.overdampedBase_velocity | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Solution.lean | [] | [
"Time",
"Time.deriv"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
overdampedBase_acceleration (IC : InitialConditions) (hS : S.IsOverdamped) :
ββ (ββ (fun t : Time =>
cosh (S.angularFrequency * t.val) β’ IC.xβ +
(sinh (S.angularFrequency * t.val) / S.angularFrequency) β’
(IC.vβ + S.decayRate β’ IC.xβ))) =
fun t : Time => S.angularFrequency^2 β’
(cosh... | by
funext t
rw [S.overdampedBase_velocity IC hS]
rw [Time.deriv]
rw [fderiv_fun_add (by fun_prop) (by fun_prop)]
rw [fderiv_smul_const (by fun_prop)]
rw [fderiv_smul_const (by fun_prop)]
have hLambda : S.angularFrequency β 0 := S.angularFrequency_ne_zero_of_overdamped hS
have hsinh :
(fderiv β (fu... | lemma | ClassicalMechanics.DampedHarmonicOscillator.overdampedBase_acceleration | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Solution.lean | [] | [
"Time",
"Time.deriv"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
trajectory_equationOfMotion_of_criticallyDamped (IC : InitialConditions)
(hS : S.IsCriticallyDamped) :
S.EquationOfMotion (S.trajectory IC) | by
rw [S.trajectory_eq_of_criticallyDamped IC hS]
have hΞ³ : S.Ξ³ = 2 * S.m * S.decayRate := S.gamma_eq_two_mul_m_mul_decayRate
have hk : S.k = S.m * (S.decayRate^2 - 0) := by
simpa [sub_zero] using S.k_eq_m_mul_decayRate_sq_of_criticallyDamped hS
have hbase :
ββ (ββ (S.criticallyDampedBase IC)) =
... | lemma | ClassicalMechanics.DampedHarmonicOscillator.trajectory_equationOfMotion_of_criticallyDamped | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Solution.lean | [] | [
"Time"
] | In the critically damped regime, the selected trajectory satisfies the damped equation
of motion. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
trajectory_equationOfMotion_of_underdamped (IC : InitialConditions)
(hS : S.IsUnderdamped) :
S.EquationOfMotion (S.trajectory IC) | by
rw [S.trajectory_eq_of_underdamped IC hS]
have hΞ³ : S.Ξ³ = 2 * S.m * S.decayRate := S.gamma_eq_two_mul_m_mul_decayRate
have hk : S.k = S.m * (S.decayRate^2 - (-S.angularFrequency^2)) := by
rw [S.k_eq_m_mul_Ο_sq, S.angularFrequency_sq_of_underdamped hS]
ring
have hbase :
ββ (ββ (S.underdampedBase... | lemma | ClassicalMechanics.DampedHarmonicOscillator.trajectory_equationOfMotion_of_underdamped | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Solution.lean | [] | [
"Time"
] | In the underdamped regime, the selected trajectory satisfies the damped equation of
motion. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
trajectory_equationOfMotion_of_overdamped (IC : InitialConditions)
(hS : S.IsOverdamped) :
S.EquationOfMotion (S.trajectory IC) | by
rw [S.trajectory_eq_of_overdamped IC hS]
have hΞ³ : S.Ξ³ = 2 * S.m * S.decayRate := S.gamma_eq_two_mul_m_mul_decayRate
have hk : S.k = S.m * (S.decayRate^2 - S.angularFrequency^2) := by
rw [S.k_eq_m_mul_Ο_sq, S.angularFrequency_sq_of_overdamped hS]
ring
have hbase :
ββ (ββ (S.overdampedBase IC)) ... | lemma | ClassicalMechanics.DampedHarmonicOscillator.trajectory_equationOfMotion_of_overdamped | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Solution.lean | [] | [
"Time"
] | In the overdamped regime, the selected trajectory satisfies the damped equation of
motion. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
trajectory_equationOfMotion (IC : InitialConditions) :
S.EquationOfMotion (S.trajectory IC) | by
by_cases hUnder : S.IsUnderdamped
Β· exact S.trajectory_equationOfMotion_of_underdamped IC hUnder
Β· by_cases hCritical : S.IsCriticallyDamped
Β· exact S.trajectory_equationOfMotion_of_criticallyDamped IC hCritical
Β· have hOver : S.IsOverdamped := by
rw [IsOverdamped, IsUnderdamped, IsCriticallyDa... | lemma | ClassicalMechanics.DampedHarmonicOscillator.trajectory_equationOfMotion | ClassicalMechanics.DampedHarmonicOscillator | Physlib/ClassicalMechanics/DampedHarmonicOscillator/Solution.lean | [] | [] | The selected trajectory satisfies the damped equation of motion. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
FreeParticle where
/--
The mass of the free particle.
This parameter determines the inertial response of the particle in
Newton's second law.
-/
mass : β
mass_pos : 0 < mass | structure | ClassicalMechanics.FreeParticle | ClassicalMechanics.FreeParticle | Physlib/ClassicalMechanics/FreeParticle/Basic.lean | [] | [] | A classical free particle with positive mass.
A free particle is a mechanical system evolving in the absence of
external forces. The dynamics are therefore entirely determined by
Newton's second law with zero force.
The only parameter of the system is the particle mass. The assumption
that the mass is strictly positi... | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
Trajectory | Time β β | abbrev | ClassicalMechanics.FreeParticle.Trajectory | ClassicalMechanics.FreeParticle | Physlib/ClassicalMechanics/FreeParticle/Basic.lean | [] | [
"Time"
] | A trajectory is a time-dependent position function describing the motion
of the particle in one spatial dimension. Defining the trajectory. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
velocity (s : FreeParticle) (q : Trajectory) (t : Time) : β | deriv q t | def | ClassicalMechanics.FreeParticle.velocity | ClassicalMechanics.FreeParticle | Physlib/ClassicalMechanics/FreeParticle/Basic.lean | [] | [
"Time"
] | The velocity of a trajectory at a given time.
This is defined as the time derivative of the position function. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
kineticEnergy (s : FreeParticle) (q : Trajectory) (t : Time) : β | (1 / 2) * s.mass * (s.velocity q t)^2 | def | ClassicalMechanics.FreeParticle.kineticEnergy | ClassicalMechanics.FreeParticle | Physlib/ClassicalMechanics/FreeParticle/Basic.lean | [] | [
"Time"
] | The kinetic energy of the free particle along a trajectory.
This is given by the classical expression `E = (1 / 2) m vΒ²`,
where `m` is the particle mass and `v` is the velocity. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
NewtonsSecondLaw (s : FreeParticle) (q : Trajectory) (t : Time) : Prop | s.mass * deriv (s.velocity q) t = 0 | def | ClassicalMechanics.FreeParticle.NewtonsSecondLaw | ClassicalMechanics.FreeParticle | Physlib/ClassicalMechanics/FreeParticle/Basic.lean | [] | [
"Time"
] | Newton's second law for the free particle.
Since no external forces act on the particle, Newton's second law
reduces to the equation `m q'' = 0`, expressing that the acceleration
vanishes identically. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
accel_zero (s : FreeParticle) (q : Trajectory) (h : β t, s.NewtonsSecondLaw q t) :
β t, deriv (deriv q) t = 0 | by
intro t
have hβ : s.mass β 0 := ne_of_gt s.mass_pos
have h1 := h t
exact (mul_eq_zero.mp h1).resolve_left hβ | lemma | ClassicalMechanics.FreeParticle.accel_zero | ClassicalMechanics.FreeParticle | Physlib/ClassicalMechanics/FreeParticle/Basic.lean | [] | [] | Newton's second law for a free particle implies that the acceleration
vanishes identically.
Since the particle mass is strictly positive, the equation
`m q'' = 0` can be simplified to `q'' = 0` by cancelling the mass
factor. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
velocity_const_of_zero_acc (q : Time β β) (h : β t, deriv (deriv q) t = 0)
(hcont : ContDiff β 1 q) : β vβ, β t, deriv q t = vβ | by
-- this is a standard analysis result (related to `is_const_of_fderiv_eq_zero`)
sorry | lemma | ClassicalMechanics.FreeParticle.velocity_const_of_zero_acc | ClassicalMechanics.FreeParticle | Physlib/ClassicalMechanics/FreeParticle/Basic.lean | [] | [
"Time"
] | If the acceleration of a trajectory vanishes everywhere, then the
velocity is constant.
More precisely, if the second derivative of the trajectory is zero
for all times, then there exists a constant `vβ` such that the
velocity is equal to `vβ` at every time.
The continuity assumption on `deriv q` is included to apply... | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
kineticEnergy_conserved (s : FreeParticle) (q : Trajectory)
(h : β t, s.NewtonsSecondLaw q t) (hcont : ContDiff β 1 q) :
β E, β t, s.kineticEnergy q t = E | by
-- get q'' = 0
have h_acc : β t, deriv (deriv q) t = 0 :=
accel_zero s q h
-- get constant velocity
rcases velocity_const_of_zero_acc q h_acc hcont with β¨vβ, hvβ©
-- energy is constant
refine β¨(1 / 2) * s.mass * vβ^2, fun t => ?_β©
unfold kineticEnergy velocity
rw [hv t] | theorem | ClassicalMechanics.FreeParticle.kineticEnergy_conserved | ClassicalMechanics.FreeParticle | Physlib/ClassicalMechanics/FreeParticle/Basic.lean | [] | [] | A free particle satisfying the equation of motion conserves kinetic energy.
The proof follows the standard argument from classical mechanics:
Newton's second law implies that the acceleration vanishes, which in
turn implies that the velocity is constant. Since the kinetic energy
depends only on the square of the veloc... | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
HarmonicOscillator where
/-- The mass of the harmonic Oscillator. -/
m : β
/-- The spring constant of the harmonic oscillator. -/
k : β
m_pos : 0 < m
k_pos : 0 < k | structure | ClassicalMechanics.HarmonicOscillator | ClassicalMechanics.HarmonicOscillator | Physlib/ClassicalMechanics/HarmonicOscillator/Basic.lean | [] | [] | The classical harmonic oscillator is specified by a mass `m`, and a spring constant `k`.
Both the mass and the string constant are assumed to be positive. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
k_ne_zero : S.k β 0 | Ne.symm (ne_of_lt S.k_pos) | lemma | ClassicalMechanics.HarmonicOscillator.k_ne_zero | ClassicalMechanics.HarmonicOscillator | Physlib/ClassicalMechanics/HarmonicOscillator/Basic.lean | [] | [] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
m_ne_zero : S.m β 0 | Ne.symm (ne_of_lt S.m_pos) | lemma | ClassicalMechanics.HarmonicOscillator.m_ne_zero | ClassicalMechanics.HarmonicOscillator | Physlib/ClassicalMechanics/HarmonicOscillator/Basic.lean | [] | [] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
Ο : β | β(S.k / S.m) | def | ClassicalMechanics.HarmonicOscillator.Ο | ClassicalMechanics.HarmonicOscillator | Physlib/ClassicalMechanics/HarmonicOscillator/Basic.lean | [] | [] | The angular frequency of the classical harmonic oscillator, `Ο`, is defined
as `β(k/m)`. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
Ο_pos : 0 < S.Ο | sqrt_pos.mpr (div_pos S.k_pos S.m_pos) | lemma | ClassicalMechanics.HarmonicOscillator.Ο_pos | ClassicalMechanics.HarmonicOscillator | Physlib/ClassicalMechanics/HarmonicOscillator/Basic.lean | [] | [] | The angular frequency of the classical harmonic oscillator is positive. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
Ο_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) | lemma | ClassicalMechanics.HarmonicOscillator.Ο_sq | ClassicalMechanics.HarmonicOscillator | Physlib/ClassicalMechanics/HarmonicOscillator/Basic.lean | [] | [] | The square of the angular frequency of the classical harmonic oscillator is equal to `k/m`. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
Ο_ne_zero : S.Ο β 0 | Ne.symm (ne_of_lt S.Ο_pos) | lemma | ClassicalMechanics.HarmonicOscillator.Ο_ne_zero | ClassicalMechanics.HarmonicOscillator | Physlib/ClassicalMechanics/HarmonicOscillator/Basic.lean | [] | [] | The angular frequency of the classical harmonic oscillator is not equal to zero. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
inverse_Ο_sq : (S.Ο ^ 2)β»ΒΉ = S.m/S.k | by
rw [Ο_sq]
field_simp | lemma | ClassicalMechanics.HarmonicOscillator.inverse_Ο_sq | ClassicalMechanics.HarmonicOscillator | Physlib/ClassicalMechanics/HarmonicOscillator/Basic.lean | [] | [] | The inverse of the square of the angular frequency of the classical harmonic oscillator
is `m/k`. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
kineticEnergy (xβ : Time β EuclideanSpace β (Fin 1)) : Time β β | fun t =>
(1 / (2 : β)) * S.m * βͺββ xβ t, ββ xβ tβ«_β | def | ClassicalMechanics.HarmonicOscillator.kineticEnergy | ClassicalMechanics.HarmonicOscillator | Physlib/ClassicalMechanics/HarmonicOscillator/Basic.lean | [] | [
"Time"
] | The kinetic energy of the harmonic oscillator is $\frac{1}{2} m β\dot xβ^2$. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
potentialEnergy (x : EuclideanSpace β (Fin 1)) : β | (1 / (2 : β)) β’ S.k β’ βͺx, xβ«_β | def | ClassicalMechanics.HarmonicOscillator.potentialEnergy | ClassicalMechanics.HarmonicOscillator | Physlib/ClassicalMechanics/HarmonicOscillator/Basic.lean | [] | [] | The potential energy of the harmonic oscillator is `1/2 k x ^ 2` | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
energy (xβ : Time β EuclideanSpace β (Fin 1)) : Time β β | fun t =>
kineticEnergy S xβ t + potentialEnergy S (xβ t) | def | ClassicalMechanics.HarmonicOscillator.energy | ClassicalMechanics.HarmonicOscillator | Physlib/ClassicalMechanics/HarmonicOscillator/Basic.lean | [] | [
"Time"
] | The energy of the harmonic oscillator is the kinetic energy plus the potential energy. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
kineticEnergy_eq (xβ : Time β EuclideanSpace β (Fin 1)) :
kineticEnergy S xβ = fun t => (1 / (2 : β)) * S.m * βͺββ xβ t, ββ xβ tβ«_β | by rfl | lemma | ClassicalMechanics.HarmonicOscillator.kineticEnergy_eq | ClassicalMechanics.HarmonicOscillator | Physlib/ClassicalMechanics/HarmonicOscillator/Basic.lean | [] | [
"Time"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
potentialEnergy_eq (x : EuclideanSpace β (Fin 1)) :
potentialEnergy S x = (1 / (2 : β)) β’ S.k β’ βͺx, xβ«_β | by rfl | lemma | ClassicalMechanics.HarmonicOscillator.potentialEnergy_eq | ClassicalMechanics.HarmonicOscillator | Physlib/ClassicalMechanics/HarmonicOscillator/Basic.lean | [] | [] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
energy_eq (xβ : Time β EuclideanSpace β (Fin 1)) :
energy S xβ = fun t => kineticEnergy S xβ t + potentialEnergy S (xβ t) | by rfl | lemma | ClassicalMechanics.HarmonicOscillator.energy_eq | ClassicalMechanics.HarmonicOscillator | Physlib/ClassicalMechanics/HarmonicOscillator/Basic.lean | [] | [
"Time"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
kineticEnergy_differentiable (xβ : Time β EuclideanSpace β (Fin 1)) (hx : ContDiff β β xβ) :
Differentiable β (kineticEnergy S xβ) | by
rw [kineticEnergy_eq]
change Differentiable β ((fun x => (1 / (2 : β)) * S.m * βͺx, xβ«_β) β (fun t => ββ xβ t))
apply Differentiable.comp
Β· fun_prop
Β· exact deriv_differentiable_of_contDiff xβ hx | lemma | ClassicalMechanics.HarmonicOscillator.kineticEnergy_differentiable | ClassicalMechanics.HarmonicOscillator | Physlib/ClassicalMechanics/HarmonicOscillator/Basic.lean | [] | [
"Time"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
potentialEnergy_differentiable (xβ : Time β EuclideanSpace β (Fin 1)) (hx : ContDiff β β xβ) :
Differentiable β (fun t => potentialEnergy S (xβ t)) | by
simp only [potentialEnergy_eq, one_div, smul_eq_mul]
change Differentiable β ((fun x => 2β»ΒΉ * (S.k * βͺx, xβ«_β)) β xβ)
apply Differentiable.comp
Β· fun_prop
Β· rw [contDiff_infty_iff_fderiv] at hx
exact hx.1 | lemma | ClassicalMechanics.HarmonicOscillator.potentialEnergy_differentiable | ClassicalMechanics.HarmonicOscillator | Physlib/ClassicalMechanics/HarmonicOscillator/Basic.lean | [] | [
"Time"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
energy_differentiable (xβ : Time β EuclideanSpace β (Fin 1)) (hx : ContDiff β β xβ) :
Differentiable β (energy S xβ) | by
rw [energy_eq]
fun_prop | lemma | ClassicalMechanics.HarmonicOscillator.energy_differentiable | ClassicalMechanics.HarmonicOscillator | Physlib/ClassicalMechanics/HarmonicOscillator/Basic.lean | [] | [
"Time"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
kineticEnergy_deriv (xβ : Time β EuclideanSpace β (Fin 1)) (hx : ContDiff β β xβ) :
ββ (kineticEnergy S xβ) = fun t => βͺββ xβ t, S.m β’ ββ (ββ xβ) tβ«_β | by
funext t
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)]
simp only [ContinuousLinearMap.smul_comp, ContinuousLinearMap.coe_smul',
Con... | lemma | ClassicalMechanics.HarmonicOscillator.kineticEnergy_deriv | ClassicalMechanics.HarmonicOscillator | Physlib/ClassicalMechanics/HarmonicOscillator/Basic.lean | [] | [
"Time",
"Time.deriv"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
potentialEnergy_deriv (xβ : Time β EuclideanSpace β (Fin 1)) (hx : ContDiff β β xβ) :
ββ (fun t => potentialEnergy S (xβ t)) = fun t => βͺββ xβ t, S.k β’ xβ tβ«_β | by
funext t
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)]
simp only [ContinuousLinearMap.smul_comp, Continu... | lemma | ClassicalMechanics.HarmonicOscillator.potentialEnergy_deriv | ClassicalMechanics.HarmonicOscillator | Physlib/ClassicalMechanics/HarmonicOscillator/Basic.lean | [] | [
"Time",
"Time.deriv"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
energy_deriv (xβ : Time β EuclideanSpace β (Fin 1)) (hx : ContDiff β β xβ) :
ββ (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)]
simp only [ContinuousLinearMap.add_apply]
rw [β Time.deriv_eq, β Time.deriv_eq]
rw [potentialEnergy_deriv, kineticEnergy_deriv]
simp only
rw [β inner_add_right]
fun_prop
... | lemma | ClassicalMechanics.HarmonicOscillator.energy_deriv | ClassicalMechanics.HarmonicOscillator | Physlib/ClassicalMechanics/HarmonicOscillator/Basic.lean | [] | [
"Time",
"Time.deriv_eq"
] | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 | |
lagrangian (t : Time) (x : EuclideanSpace β (Fin 1))
(v : EuclideanSpace β (Fin 1)) : β | 1 / (2 : β) * S.m * βͺv, vβ«_β - S.potentialEnergy x | def | ClassicalMechanics.HarmonicOscillator.lagrangian | ClassicalMechanics.HarmonicOscillator | Physlib/ClassicalMechanics/HarmonicOscillator/Basic.lean | [] | [
"Time"
] | The lagrangian of the harmonic oscillator is the kinetic energy minus the potential energy. | https://github.com/HEPLean/PhysLean | 01143d7c9702318879b3c86bd9eadcdc60a13cc3 |
Structured dataset from PhysLean β Formalization of physics.
01143d7c9702318879b3c86bd9eadcdc60a13cc3| Column | Type | Description |
|---|---|---|
| statement | string | Declaration signature/claim with the leading keyword removed (verbatim slice); the full declaration minus its proof |
| proof | string | Verbatim proof/body, empty if the declaration has none |
| type | string | Declaration keyword |
| symbolic_name | string | Declaration identifier |
| library | string | Sub-library |
| filename | string | Repository-relative source path |
| imports | list[string] | File-level Require/Import modules |
| deps | list[string] | Intra-corpus identifiers referenced |
| docstring | string | Preceding documentation comment, empty if absent |
| source_url | string | Upstream repository |
| commit | string | Upstream commit extracted |
| Type | Count |
|---|---|
| lemma | 6,273 |
| def | 2,097 |
| theorem | 1,513 |
| instance | 142 |
| abbrev | 139 |
| structure | 122 |
| inductive | 22 |
| class | 22 |
| macro | 11 |
| class abbrev | 1 |
toCompactlySupportedContinuousMap (Ξ· : AdmissibleVariation d U) :
CompactlySupportedContinuousMap (Space d) U
Ξ·.isTestFunction.toCompactlySupportedContinuousMap
ClassicalFieldTheory.Local.AdmissibleVariation.toCompactlySupportedContinuousMap | Physlib/ClassicalFieldTheory/Local/Variation.leanEach declaration is split into a statement (signature/claim) and a proof (body) that are disjoint
and together form the complete declaration, for proof modeling, autoformalization, retrieval, and
dependency analysis via deps.
@misc{lean4_physlean_dataset,
title = {Lean4-PhysLean},
author = {Norton, Charles},
year = {2026},
note = {Extracted from https://github.com/HEPLean/PhysLean, commit 01143d7c9702},
url = {https://huggingface.co/datasets/phanerozoic/Lean4-PhysLean}
}