library
stringclasses
2 values
module
stringclasses
712 values
name
stringlengths
1
79
split
stringclasses
1 value
prompt
listlengths
1
1
completion
listlengths
1
1
physlib
Physlib.ClassicalFieldTheory.Local.Variation
hasCompactSupport
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Juan Jose Fernandez Morales. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Juan Jose Fernandez Morales\n-/\nmodule\n\npublic import Physlib.Mathematics....
[ { "role": "assistant", "content": "```lean4\nlemma hasCompactSupport (η : AdmissibleVariation d U) : HasCompactSupport (η.toFun) := by\n exact η.isTestFunction.supp\n```" } ]
physlib
Physlib.ClassicalFieldTheory.Local.Variation
zero_apply
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Juan Jose Fernandez Morales. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Juan Jose Fernandez Morales\n-/\nmodule\n\npublic import Physlib.Mathematics....
[ { "role": "assistant", "content": "```lean4\nlemma zero_apply (x : Space d) : (0 : AdmissibleVariation d U) x = 0 := by\n exact rfl\n```" } ]
physlib
Physlib.ClassicalFieldTheory.Local.Variation
neg_apply
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Juan Jose Fernandez Morales. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Juan Jose Fernandez Morales\n-/\nmodule\n\npublic import Physlib.Mathematics....
[ { "role": "assistant", "content": "```lean4\nlemma neg_apply (η : AdmissibleVariation d U) (x : Space d) : (-η) x = -η x := by\n exact rfl\n```" } ]
physlib
Physlib.ClassicalFieldTheory.Local.Variation
add_apply
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Juan Jose Fernandez Morales. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Juan Jose Fernandez Morales\n-/\nmodule\n\npublic import Physlib.Mathematics....
[ { "role": "assistant", "content": "```lean4\nlemma add_apply (η ξ : AdmissibleVariation d U) (x : Space d) : (η + ξ) x = η x + ξ x := by\n exact rfl\n```" } ]
physlib
Physlib.ClassicalFieldTheory.Local.Variation
sub_apply
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Juan Jose Fernandez Morales. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Juan Jose Fernandez Morales\n-/\nmodule\n\npublic import Physlib.Mathematics....
[ { "role": "assistant", "content": "```lean4\nlemma sub_apply (η ξ : AdmissibleVariation d U) (x : Space d) : (η - ξ) x = η x - ξ x := by\n exact rfl\n```" } ]
physlib
Physlib.ClassicalFieldTheory.Local.Variation
smul_apply
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Juan Jose Fernandez Morales. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Juan Jose Fernandez Morales\n-/\nmodule\n\npublic import Physlib.Mathematics....
[ { "role": "assistant", "content": "```lean4\nlemma smul_apply (c : ℝ) (η : AdmissibleVariation d U) (x : Space d) :\n (c • η) x = c • η x := by\n exact rfl\n```" } ]
physlib
Physlib.ClassicalFieldTheory.Local.Variation
coord
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Juan Jose Fernandez Morales. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Juan Jose Fernandez Morales\n-/\nmodule\n\npublic import Physlib.Mathematics....
[ { "role": "assistant", "content": "```lean4\nlemma coord {m : ℕ} (η : AdmissibleVariation d (Space m)) (a : Fin m) :\n IsTestFunction (fun x => (η.toFun x).coord a) := by\n simpa [Space.coord] using IsTestFunction.coord η.isTestFunction a\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
acceleration_eq_of_equationOfMotion
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma acceleration_eq_of_equationOfMotion (z : Time → EuclideanSpace ℝ (Fin 1))\n (hEOM : S.EquationOfMotion z) (t : Time) :\n ∂ₜ (∂ₜ z) t = (-(S.m⁻¹ * S.k)) • z t + (-(S.m⁻¹ * S.γ)) • ∂ₜ z t := by\n have hm : S.m ≠ 0 := S.m_ne_zero\n have hsum : S.m • ∂ₜ...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
energy_dissipation_rate
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma energy_dissipation_rate (xₜ : Time → EuclideanSpace ℝ (Fin 1)) (t : Time)\n (h1 : S.EquationOfMotion xₜ)\n (hx : ContDiff ℝ ∞ xₜ) :\n ∂ₜ (S.energy xₜ) t = - S.γ * ⟪∂ₜ xₜ t, ∂ₜ xₜ t⟫_ℝ := by\n rw [S.energy_deriv xₜ hx]\n have hforce : S.m • ∂ₜ (∂ₜ...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
energy_not_conserved
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma energy_not_conserved (xₜ : Time → EuclideanSpace ℝ (Fin 1)) (t : Time)\n (h1 : S.EquationOfMotion xₜ) (hx : ContDiff ℝ ∞ xₜ) (hdx : ∂ₜ xₜ t ≠ 0) (hγ : 0 < S.γ) :\n ∂ₜ (S.energy xₜ) t < 0 := by\n rw [energy_dissipation_rate S xₜ t h1 hx, neg_mul]\n e...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
equationOfMotion_iff_newtons_2nd_law
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma equationOfMotion_iff_newtons_2nd_law (xₜ : Time → EuclideanSpace ℝ (Fin 1)) :\n S.EquationOfMotion xₜ ↔\n (∀ t : Time, S.m • ∂ₜ (∂ₜ xₜ) t = force S xₜ t) := by\n simp only [EquationOfMotion, force]\n constructor\n · intro h t\n linear_combinatio...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
isUnderdamped_or_isCriticallyDamped_or_isOverdamped
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma isUnderdamped_or_isCriticallyDamped_or_isOverdamped :\n S.IsUnderdamped ∨ S.IsCriticallyDamped ∨ S.IsOverdamped := by\n exact lt_trichotomy S.discriminant 0\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
discriminant_eq_four_mul_m_sq_mul_decayRate_sq_sub_ω_sq
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma discriminant_eq_four_mul_m_sq_mul_decayRate_sq_sub_ω_sq :\n S.discriminant = 4 * S.m^2 * (S.decayRate^2 - S.ω^2) := by\n rw [discriminant, decayRate, S.ω_sq]\n field_simp [S.m_ne_zero]\n ring\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
decayRate_nonneg
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma decayRate_nonneg : 0 ≤ S.decayRate := by\n exact div_nonneg S.γ_nonneg (by nlinarith [S.m_pos])\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
decayRate_pos
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma decayRate_pos (hγ : 0 < S.γ) : 0 < S.decayRate := by\n exact div_pos hγ (by linarith [S.m_pos])\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
isUnderdamped_of_gamma_eq_zero
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma isUnderdamped_of_gamma_eq_zero (hγ : S.γ = 0) : S.IsUnderdamped := by\n rw [IsUnderdamped, discriminant, hγ]\n nlinarith [mul_pos S.m_pos S.k_pos]\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
isUnderdamped_decayRate
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma isUnderdamped_decayRate (hS : S.IsUnderdamped) : S.decayRate < S.ω := by\n rw [IsUnderdamped, discriminant_eq_four_mul_m_sq_mul_decayRate_sq_sub_ω_sq] at hS\n have hsq : S.decayRate ^ 2 < S.ω ^ 2 := by nlinarith [sq_pos_of_pos S.m_pos]\n nlinarith [S.dec...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
isCriticallyDamped_decayRate
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma isCriticallyDamped_decayRate (hS : S.IsCriticallyDamped) : S.ω = S.decayRate := by\n rw [IsCriticallyDamped, discriminant_eq_four_mul_m_sq_mul_decayRate_sq_sub_ω_sq] at hS\n have hsq : S.decayRate ^ 2 = S.ω ^ 2 := by nlinarith [sq_pos_of_pos S.m_pos]\n n...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
gamma_eq_two_mul_m_mul_decayRate
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma gamma_eq_two_mul_m_mul_decayRate : S.γ = 2 * S.m * S.decayRate := by\n rw [decayRate]\n field_simp [S.m_ne_zero]\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
k_eq_m_mul_ω_sq
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma k_eq_m_mul_ω_sq : S.k = S.m * S.ω^2 := by\n rw [S.ω_sq]\n field_simp [S.m_ne_zero]\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
k_eq_m_mul_decayRate_sq_of_criticallyDamped
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma k_eq_m_mul_decayRate_sq_of_criticallyDamped (hS : S.IsCriticallyDamped) :\n S.k = S.m * S.decayRate^2 := by\n rw [S.k_eq_m_mul_ω_sq, S.isCriticallyDamped_decayRate hS]\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
isOverdamped_decayRate
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma isOverdamped_decayRate (hS : S.IsOverdamped) : S.ω < S.decayRate := by\n rw [IsOverdamped, discriminant_eq_four_mul_m_sq_mul_decayRate_sq_sub_ω_sq] at hS\n have hsq : S.ω ^ 2 < S.decayRate ^ 2 := by nlinarith [sq_pos_of_pos S.m_pos]\n nlinarith [S.decayR...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
angularFrequency_eq_underdamped
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma angularFrequency_eq_underdamped (hS : S.IsUnderdamped) :\n S.angularFrequency = sqrt (- S.discriminant) / (2 * S.m) := by\n simp [angularFrequency, hS]\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
angularFrequency_eq_criticallyDamped
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma angularFrequency_eq_criticallyDamped (hS : S.IsCriticallyDamped) :\n S.angularFrequency = 0 := by\n rw [IsCriticallyDamped] at hS\n simp [angularFrequency, IsUnderdamped, IsCriticallyDamped, hS]\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
angularFrequency_eq_overdamped
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma angularFrequency_eq_overdamped (hS : S.IsOverdamped) :\n S.angularFrequency = sqrt S.discriminant / (2 * S.m) := by\n rw [IsOverdamped] at hS\n simp [angularFrequency, IsUnderdamped, IsCriticallyDamped, not_lt.mpr hS.le, hS.ne']\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
angularFrequency_sq_of_underdamped
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma angularFrequency_sq_of_underdamped (hS : S.IsUnderdamped) :\n S.angularFrequency^2 = S.ω^2 - S.decayRate^2 := by\n rw [S.angularFrequency_eq_underdamped hS, div_pow, sq_sqrt]\n · rw [discriminant_eq_four_mul_m_sq_mul_decayRate_sq_sub_ω_sq]\n field_s...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
angularFrequency_pos_of_underdamped
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma angularFrequency_pos_of_underdamped (hS : S.IsUnderdamped) :\n 0 < S.angularFrequency := by\n rw [S.angularFrequency_eq_underdamped hS]\n exact div_pos (sqrt_pos.mpr (neg_pos.mpr hS)) (by linarith [S.m_pos])\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
angularFrequency_ne_zero_of_underdamped
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma angularFrequency_ne_zero_of_underdamped (hS : S.IsUnderdamped) :\n S.angularFrequency ≠ 0 := by\n exact (S.angularFrequency_pos_of_underdamped hS).ne'\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
angularFrequency_sq_of_overdamped
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma angularFrequency_sq_of_overdamped (hS : S.IsOverdamped) :\n S.angularFrequency^2 = S.decayRate^2 - S.ω^2 := by\n rw [S.angularFrequency_eq_overdamped hS, div_pow, sq_sqrt]\n · rw [discriminant_eq_four_mul_m_sq_mul_decayRate_sq_sub_ω_sq]\n field_simp...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
angularFrequency_pos_of_overdamped
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma angularFrequency_pos_of_overdamped (hS : S.IsOverdamped) :\n 0 < S.angularFrequency := by\n rw [S.angularFrequency_eq_overdamped hS]\n exact div_pos (sqrt_pos.mpr hS) (by linarith [S.m_pos])\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
angularFrequency_ne_zero_of_overdamped
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma angularFrequency_ne_zero_of_overdamped (hS : S.IsOverdamped) :\n S.angularFrequency ≠ 0 := by\n exact (S.angularFrequency_pos_of_overdamped hS).ne'\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
isUnderdamped_iff_decayRate_lt
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma isUnderdamped_iff_decayRate_lt : S.IsUnderdamped ↔ S.decayRate < S.ω := by\n refine ⟨S.isUnderdamped_decayRate, fun h => ?_⟩\n rcases S.isUnderdamped_or_isCriticallyDamped_or_isOverdamped with hS | hS | hS\n · exact hS\n · exact absurd (S.isCriticallyDa...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
isCriticallyDamped_iff_eq_decayRate
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma isCriticallyDamped_iff_eq_decayRate : S.IsCriticallyDamped ↔ S.ω = S.decayRate := by\n refine ⟨S.isCriticallyDamped_decayRate, fun h => ?_⟩\n rcases S.isUnderdamped_or_isCriticallyDamped_or_isOverdamped with hS | hS | hS\n · exact absurd (S.isUnderdamped...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
isOverdamped_iff_lt_decayRate
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma isOverdamped_iff_lt_decayRate : S.IsOverdamped ↔ S.ω < S.decayRate := by\n refine ⟨S.isOverdamped_decayRate, fun h => ?_⟩\n rcases S.isUnderdamped_or_isCriticallyDamped_or_isOverdamped with hS | hS | hS\n · exact absurd (S.isUnderdamped_decayRate hS) (lt...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
qualityFactor_eq_m_mul_ω_div_γ
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma qualityFactor_eq_m_mul_ω_div_γ : S.qualityFactor = S.m * S.ω / S.γ := by\n unfold qualityFactor decayRate\n field_simp [S.m_ne_zero]\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
qualityFactor_eq_sqrt_div
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma qualityFactor_eq_sqrt_div : S.qualityFactor = √(S.m * S.k) / S.γ := by\n rw [S.qualityFactor_eq_m_mul_ω_div_γ, S.k_eq_m_mul_ω_sq,\n show S.m * (S.m * S.ω ^ 2) = (S.m * S.ω) ^ 2 by ring,\n Real.sqrt_sq (mul_nonneg S.m_pos.le S.ω_pos.le)]\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
qualityFactor_pos
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma qualityFactor_pos (hγ : 0 < S.γ) : 0 < S.qualityFactor := by\n rw [S.qualityFactor_eq_m_mul_ω_div_γ]\n exact div_pos (mul_pos S.m_pos S.ω_pos) hγ\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
qualityFactor_sq
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma qualityFactor_sq : S.qualityFactor ^ 2 = S.m * S.k / S.γ ^ 2 := by\n rw [S.qualityFactor_eq_sqrt_div, div_pow, Real.sq_sqrt (mul_nonneg S.m_pos.le S.k_pos.le)]\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
discriminant_eq_mul_qualityFactor
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma discriminant_eq_mul_qualityFactor :\n S.discriminant = 4 * S.m * S.k * (1 / (4 * S.qualityFactor ^ 2) - 1) := by\n rw [S.qualityFactor_sq, discriminant]\n rcases eq_or_ne S.γ 0 with h | h\n · simp [h]\n · field_simp [h, S.m_ne_zero, S.k_ne_zero]\n```...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
isUnderdamped_iff_half_lt_qualityFactor
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma isUnderdamped_iff_half_lt_qualityFactor (hγ : 0 < S.γ) :\n S.IsUnderdamped ↔ 1 / 2 < S.qualityFactor := by\n have hβ := S.decayRate_pos hγ\n rw [S.isUnderdamped_iff_decayRate_lt, qualityFactor, lt_div_iff₀ (by linarith)]\n constructor <;> intro h <;> ...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
isCriticallyDamped_iff_qualityFactor_eq_half
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma isCriticallyDamped_iff_qualityFactor_eq_half (hγ : 0 < S.γ) :\n S.IsCriticallyDamped ↔ S.qualityFactor = 1 / 2 := by\n have hβ := S.decayRate_pos hγ\n rw [S.isCriticallyDamped_iff_eq_decayRate, qualityFactor, div_eq_iff (by linarith)]\n constructor <;...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
isOverdamped_iff_qualityFactor_lt_half
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.Ha...
[ { "role": "assistant", "content": "```lean4\nlemma isOverdamped_iff_qualityFactor_lt_half (hγ : 0 < S.γ) :\n S.IsOverdamped ↔ S.qualityFactor < 1 / 2 := by\n have hβ := S.decayRate_pos hγ\n rw [S.isOverdamped_iff_lt_decayRate, qualityFactor, div_lt_iff₀ (by linarith)]\n constructor <;> intro h <;> lin...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
angularFrequency_sq_eq_mul_qualityFactor
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\nmodule\npublic import Physlib.ClassicalMechanics.HarmonicOscillator.Basic\n\n@[expose] public section\n\nnamespace ClassicalMechanics\nopen Real\nopen Space\nopen InnerProductSpace\nopen MeasureTheory\nopen ContDiff\nopen Time\n\...
[ { "role": "assistant", "content": "```lean4\nlemma angularFrequency_sq_eq_mul_qualityFactor (hγ : 0 < S.γ) (hS : S.IsUnderdamped) :\n S.angularFrequency ^ 2 = S.ω ^ 2 * (1 - 1 / (4 * S.qualityFactor ^ 2)) := by\n have hβ := (S.decayRate_pos hγ).ne'\n rw [S.angularFrequency_sq_of_underdamped hS, quality...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
relaxationTime_eq
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\nmodule\npublic import Physlib.ClassicalMechanics.HarmonicOscillator.Basic\n\n@[expose] public section\n\nnamespace ClassicalMechanics\nopen Real\nopen Space\nopen InnerProductSpace\nopen MeasureTheory\nopen ContDiff\nopen Time\n\...
[ { "role": "assistant", "content": "```lean4\nlemma relaxationTime_eq : S.relaxationTime = 2 * S.m / S.γ := by\n rw [relaxationTime, decayRate, inv_div]\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
decayRate_mul_relaxationTime
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\nmodule\npublic import Physlib.ClassicalMechanics.HarmonicOscillator.Basic\n\n@[expose] public section\n\nnamespace ClassicalMechanics\nopen Real\nopen Space\nopen InnerProductSpace\nopen MeasureTheory\nopen ContDiff\nopen Time\n\...
[ { "role": "assistant", "content": "```lean4\nlemma decayRate_mul_relaxationTime (hγ : 0 < S.γ) : S.decayRate * S.relaxationTime = 1 := by\n exact mul_inv_cancel₀ (S.decayRate_pos hγ).ne'\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
relaxationTime_pos
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\nmodule\npublic import Physlib.ClassicalMechanics.HarmonicOscillator.Basic\n\n@[expose] public section\n\nnamespace ClassicalMechanics\nopen Real\nopen Space\nopen InnerProductSpace\nopen MeasureTheory\nopen ContDiff\nopen Time\n\...
[ { "role": "assistant", "content": "```lean4\nlemma relaxationTime_pos (hγ : 0 < S.γ) : 0 < S.relaxationTime := by\n exact inv_pos.mpr (S.decayRate_pos hγ)\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
qualityFactor_eq_ω_mul_relaxationTime
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\nmodule\npublic import Physlib.ClassicalMechanics.HarmonicOscillator.Basic\n\n@[expose] public section\n\nnamespace ClassicalMechanics\nopen Real\nopen Space\nopen InnerProductSpace\nopen MeasureTheory\nopen ContDiff\nopen Time\n\...
[ { "role": "assistant", "content": "```lean4\nlemma qualityFactor_eq_ω_mul_relaxationTime : S.qualityFactor = S.ω * S.relaxationTime / 2 := by\n rw [qualityFactor, relaxationTime]\n ring\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
exp_neg_decayRate_mul
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\nmodule\npublic import Physlib.ClassicalMechanics.HarmonicOscillator.Basic\n\n@[expose] public section\n\nnamespace ClassicalMechanics\nopen Real\nopen Space\nopen InnerProductSpace\nopen MeasureTheory\nopen ContDiff\nopen Time\n\...
[ { "role": "assistant", "content": "```lean4\nlemma exp_neg_decayRate_mul (t : Time) :\n exp (-S.decayRate * t) = exp (-(t : ℝ) / S.relaxationTime) := by\n rw [relaxationTime, div_inv_eq_mul]\n ring_nf\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
toUndamped_equationOfMotion
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\nmodule\npublic import Physlib.ClassicalMechanics.HarmonicOscillator.Basic\n\n@[expose] public section\n\nnamespace ClassicalMechanics\nopen Real\nopen Space\nopen InnerProductSpace\nopen MeasureTheory\nopen ContDiff\nopen Time\n\...
[ { "role": "assistant", "content": "```lean4\nlemma toUndamped_equationOfMotion (S : DampedHarmonicOscillator) (hS : S.IsUndamped)\n (xₜ : Time → EuclideanSpace ℝ (Fin 1)) (hx : ContDiff ℝ ∞ xₜ) :\n S.EquationOfMotion xₜ ↔ (S.toUndamped hS).EquationOfMotion xₜ := by\n have hγ : S.γ = 0 := by simpa [Is...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
lagrangian_eq
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\nmodule\npublic import Physlib.ClassicalMechanics.HarmonicOscillator.Basic\n@[expose] public section\nnamespace ClassicalMechanics\nopen Real\nopen Space\nopen InnerProductSpace\nopen MeasureTheory\nopen ContDiff\nopen Time\n\n/--...
[ { "role": "assistant", "content": "```lean4\nlemma lagrangian_eq : S.lagrangian = fun (t : Time) (x v : EuclideanSpace ℝ (Fin 1)) =>\n exp (S.γ / S.m * t) * (1 / (2 : ℝ) * S.m * ⟪v, v⟫_ℝ - 1 / (2 : ℝ) * S.k * ⟪x, x⟫_ℝ) := by\n funext t x v\n rw [lagrangian, S.toHarmonicOscillator.lagrangian_eq]\n```" ...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
lagrangian_eq_exp_mul_kineticEnergy_sub_potentialEnergy
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\nmodule\npublic import Physlib.ClassicalMechanics.HarmonicOscillator.Basic\n@[expose] public section\nnamespace ClassicalMechanics\nopen Real\nopen Space\nopen InnerProductSpace\nopen MeasureTheory\nopen ContDiff\nopen Time\n\n@[e...
[ { "role": "assistant", "content": "```lean4\nlemma lagrangian_eq_exp_mul_kineticEnergy_sub_potentialEnergy (t : Time)\n (xₜ : Time → EuclideanSpace ℝ (Fin 1)) :\n S.lagrangian t (xₜ t) (∂ₜ xₜ t) =\n exp (S.γ / S.m * t) * (S.kineticEnergy xₜ t - S.potentialEnergy (xₜ t)) := by\n rw [lagrangian, S...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
lagrangian_of_isUndamped
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\nmodule\npublic import Physlib.ClassicalMechanics.HarmonicOscillator.Basic\n@[expose] public section\nnamespace ClassicalMechanics\nopen Real\nopen Space\nopen InnerProductSpace\nopen MeasureTheory\nopen ContDiff\nopen Time\nnames...
[ { "role": "assistant", "content": "```lean4\nlemma lagrangian_of_isUndamped (hS : S.IsUndamped) :\n S.lagrangian = S.toHarmonicOscillator.lagrangian := by\n have hγ : S.γ = 0 := by simpa [IsUndamped] using hS\n funext t x v\n simp [lagrangian, hγ]\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
contDiff_lagrangian
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\nmodule\npublic import Physlib.ClassicalMechanics.HarmonicOscillator.Basic\n@[expose] public section\nnamespace ClassicalMechanics\nopen Real\nopen Space\nopen InnerProductSpace\nopen MeasureTheory\nopen ContDiff\nopen Time\nnames...
[ { "role": "assistant", "content": "```lean4\nlemma contDiff_lagrangian (n : WithTop ℕ∞) : ContDiff ℝ n ↿S.lagrangian := by\n show ContDiff ℝ n fun p : Time × EuclideanSpace ℝ (Fin 1) × EuclideanSpace ℝ (Fin 1) =>\n exp (S.γ / S.m * p.1) * ↿S.toHarmonicOscillator.lagrangian p\n fun_prop\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
gradient_lagrangian_position_eq
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\nmodule\npublic import Physlib.ClassicalMechanics.HarmonicOscillator.Basic\n@[expose] public section\nnamespace ClassicalMechanics\nopen Real\nopen Space\nopen InnerProductSpace\nopen MeasureTheory\nopen ContDiff\nopen Time\nnames...
[ { "role": "assistant", "content": "```lean4\nlemma gradient_lagrangian_position_eq (t : Time) (x v : EuclideanSpace ℝ (Fin 1)) :\n gradient (fun x => S.lagrangian t x v) x = -(exp (S.γ / S.m * t) * S.k) • x := by\n have hf : DifferentiableAt ℝ (fun y => S.toHarmonicOscillator.lagrangian t y v) x := by\n...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
gradient_lagrangian_velocity_eq
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\nmodule\npublic import Physlib.ClassicalMechanics.HarmonicOscillator.Basic\n@[expose] public section\nnamespace ClassicalMechanics\nopen Real\nopen Space\nopen InnerProductSpace\nopen MeasureTheory\nopen ContDiff\nopen Time\nnames...
[ { "role": "assistant", "content": "```lean4\nlemma gradient_lagrangian_velocity_eq (t : Time) (x v : EuclideanSpace ℝ (Fin 1)) :\n gradient (S.lagrangian t x) v = (exp (S.γ / S.m * t) * S.m) • v := by\n have hf : DifferentiableAt ℝ (fun w => S.toHarmonicOscillator.lagrangian t x w) v := by\n simp onl...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
gradLagrangian_eq_eulerLagrangeOp
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\nmodule\npublic import Physlib.ClassicalMechanics.HarmonicOscillator.Basic\n@[expose] public section\nnamespace ClassicalMechanics\nopen Real\nopen Space\nopen InnerProductSpace\nopen MeasureTheory\nopen ContDiff\nopen Time\nnames...
[ { "role": "assistant", "content": "```lean4\nlemma gradLagrangian_eq_eulerLagrangeOp (xₜ : Time → EuclideanSpace ℝ (Fin 1))\n (hq : ContDiff ℝ ∞ xₜ) :\n S.gradLagrangian xₜ = eulerLagrangeOp S.lagrangian xₜ := by\n rw [gradLagrangian,\n ClassicalMechanics.euler_lagrange_varGradient _ _ hq (S.contD...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
deriv_exp_smul
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\nmodule\npublic import Physlib.ClassicalMechanics.HarmonicOscillator.Basic\n@[expose] public section\nnamespace ClassicalMechanics\nopen Real\nopen Space\nopen InnerProductSpace\nopen MeasureTheory\nopen ContDiff\nopen Time\nnames...
[ { "role": "assistant", "content": "```lean4\nlemma deriv_exp_smul (a : ℝ) (y : Time → EuclideanSpace ℝ (Fin 1))\n (hy : Differentiable ℝ y) (t : Time) :\n ∂ₜ (fun t' : Time => exp (a * t'.val) • y t') t =\n exp (a * t.val) • (∂ₜ y t + a • y t) := by\n rw [Time.deriv, fderiv_fun_smul (by fun_prop...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
gradLagrangian_eq_force
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\nmodule\npublic import Physlib.ClassicalMechanics.HarmonicOscillator.Basic\n@[expose] public section\nnamespace ClassicalMechanics\nopen Real\nopen Space\nopen InnerProductSpace\nopen MeasureTheory\nopen ContDiff\nopen Time\nnames...
[ { "role": "assistant", "content": "```lean4\nlemma gradLagrangian_eq_force (xₜ : Time → EuclideanSpace ℝ (Fin 1)) (hx : ContDiff ℝ ∞ xₜ) :\n S.gradLagrangian xₜ = fun t : Time =>\n exp (S.γ / S.m * t) • (force S xₜ t - S.m • ∂ₜ (∂ₜ xₜ) t) := by\n have hdx : Differentiable ℝ (∂ₜ xₜ) := deriv_differe...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
equationOfMotion_iff_gradLagrangian_zero
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\nmodule\npublic import Physlib.ClassicalMechanics.HarmonicOscillator.Basic\n@[expose] public section\nnamespace ClassicalMechanics\nopen Real\nopen Space\nopen InnerProductSpace\nopen MeasureTheory\nopen ContDiff\nopen Time\nnames...
[ { "role": "assistant", "content": "```lean4\nlemma equationOfMotion_iff_gradLagrangian_zero (xₜ : Time → EuclideanSpace ℝ (Fin 1))\n (hx : ContDiff ℝ ∞ xₜ) :\n S.EquationOfMotion xₜ ↔ S.gradLagrangian xₜ = 0 := by\n rw [S.equationOfMotion_iff_newtons_2nd_law xₜ, gradLagrangian_eq_force S xₜ hx, funex...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Solution
trajectory_eq_of_underdamped
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Florian Wiesner. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Giuseppe Sorge, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.D...
[ { "role": "assistant", "content": "```lean4\nlemma trajectory_eq_of_underdamped (IC : InitialConditions) (hS : S.IsUnderdamped) :\n S.trajectory IC =\n fun t : Time => exp (-S.decayRate * t) • S.underdampedBase IC t := by\n classical\n simp [trajectory, hS]\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Solution
trajectory_eq_of_criticallyDamped
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Florian Wiesner. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Giuseppe Sorge, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.D...
[ { "role": "assistant", "content": "```lean4\nlemma trajectory_eq_of_criticallyDamped (IC : InitialConditions) (hS : S.IsCriticallyDamped) :\n S.trajectory IC =\n fun t : Time => exp (-S.decayRate * t) • S.criticallyDampedBase IC t := by\n classical\n have hnotUnder : ¬ S.IsUnderdamped := by\n r...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Solution
trajectory_eq_of_overdamped
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Florian Wiesner. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Giuseppe Sorge, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.D...
[ { "role": "assistant", "content": "```lean4\nlemma trajectory_eq_of_overdamped (IC : InitialConditions) (hS : S.IsOverdamped) :\n S.trajectory IC =\n fun t : Time => exp (-S.decayRate * t) • S.overdampedBase IC t := by\n classical\n rw [IsOverdamped] at hS\n have hnotUnder : ¬ S.IsUnderdamped := ...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Solution
trajectory_eq_of_underdamped_relaxationTime
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Florian Wiesner. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Giuseppe Sorge, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.D...
[ { "role": "assistant", "content": "```lean4\nlemma trajectory_eq_of_underdamped_relaxationTime (IC : InitialConditions)\n (hS : S.IsUnderdamped) :\n S.trajectory IC =\n fun t : Time => exp (-(t : ℝ) / S.relaxationTime) • S.underdampedBase IC t := by\n rw [S.trajectory_eq_of_underdamped IC hS]\n ...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Solution
trajectory_contDiff
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Florian Wiesner. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Giuseppe Sorge, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.D...
[ { "role": "assistant", "content": "```lean4\nlemma trajectory_contDiff (IC : InitialConditions) :\n ContDiff ℝ ∞ (S.trajectory IC) := by\n rcases S.isUnderdamped_or_isCriticallyDamped_or_isOverdamped with hS | hS | hS\n · rw [S.trajectory_eq_of_underdamped IC hS]\n unfold underdampedBase\n fun_pr...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Solution
trajectory_apply_zero
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Florian Wiesner. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Giuseppe Sorge, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.D...
[ { "role": "assistant", "content": "```lean4\nlemma trajectory_apply_zero (IC : InitialConditions) : S.trajectory IC 0 = IC.x₀ := by\n rcases S.isUnderdamped_or_isCriticallyDamped_or_isOverdamped with hS | hS | hS\n · rw [S.trajectory_eq_of_underdamped IC hS]\n simp [underdampedBase]\n · rw [S.trajecto...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Solution
exp_decay_smul_velocity
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Florian Wiesner. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Giuseppe Sorge, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.D...
[ { "role": "assistant", "content": "```lean4\nlemma exp_decay_smul_velocity\n (a : ℝ) (y : Time → EuclideanSpace ℝ (Fin 1)) (hy : Differentiable ℝ y) :\n ∂ₜ (fun t : Time => exp (-a * t.val) • y t) =\n fun t : Time => exp (-a * t.val) • (∂ₜ y t - a • y t) := by\n funext t\n rw [Time.deriv]\n rw...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Solution
exp_decay_smul_acceleration
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Florian Wiesner. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Giuseppe Sorge, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.D...
[ { "role": "assistant", "content": "```lean4\nlemma exp_decay_smul_acceleration\n (a μ : ℝ) (y : Time → EuclideanSpace ℝ (Fin 1))\n (hy : Differentiable ℝ y) (hdy : Differentiable ℝ (∂ₜ y))\n (hy'' : ∂ₜ (∂ₜ y) = fun t => μ • y t) :\n ∂ₜ (∂ₜ (fun t : Time => exp (-a * t.val) • y t)) =\n fun t...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Solution
exp_decay_smul_equationOfMotion
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Florian Wiesner. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Giuseppe Sorge, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.D...
[ { "role": "assistant", "content": "```lean4\nlemma exp_decay_smul_equationOfMotion\n (a μ : ℝ) (y : Time → EuclideanSpace ℝ (Fin 1))\n (hy : Differentiable ℝ y) (hdy : Differentiable ℝ (∂ₜ y))\n (hy'' : ∂ₜ (∂ₜ y) = fun t => μ • y t)\n (hγ : S.γ = 2 * S.m * a) (hk : S.k = S.m * (a^2 - μ)) :\n ...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Solution
criticallyDampedBase_velocity
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Florian Wiesner. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Giuseppe Sorge, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.D...
[ { "role": "assistant", "content": "```lean4\nlemma criticallyDampedBase_velocity (IC : InitialConditions) :\n ∂ₜ (S.criticallyDampedBase IC) =\n fun _ : Time => IC.v₀ + S.decayRate • IC.x₀ := by\n funext t\n change ∂ₜ (fun t : Time =>\n IC.x₀ + t.val • (IC.v₀ + S.decayRate • IC.x₀)) t = _\n rw...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Solution
criticallyDampedBase_acceleration
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Florian Wiesner. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Giuseppe Sorge, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.D...
[ { "role": "assistant", "content": "```lean4\nlemma criticallyDampedBase_acceleration (IC : InitialConditions) :\n ∂ₜ (∂ₜ (S.criticallyDampedBase IC)) =\n fun _ => (0 : EuclideanSpace ℝ (Fin 1)) := by\n rw [criticallyDampedBase_velocity]\n funext t\n simp\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Solution
underdampedBase_velocity
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Florian Wiesner. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Giuseppe Sorge, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.D...
[ { "role": "assistant", "content": "```lean4\nlemma underdampedBase_velocity (IC : InitialConditions) (hS : S.IsUnderdamped) :\n ∂ₜ (fun t : Time =>\n cos (S.angularFrequency * t.val) • IC.x₀ +\n (sin (S.angularFrequency * t.val) / S.angularFrequency) •\n (IC.v₀ + S.decayRate • IC.x₀)...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Solution
underdampedBase_acceleration
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Florian Wiesner. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Giuseppe Sorge, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.D...
[ { "role": "assistant", "content": "```lean4\nlemma underdampedBase_acceleration (IC : InitialConditions) (hS : S.IsUnderdamped) :\n ∂ₜ (∂ₜ (fun t : Time =>\n cos (S.angularFrequency * t.val) • IC.x₀ +\n (sin (S.angularFrequency * t.val) / S.angularFrequency) •\n (IC.v₀ + S.decayRate ...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Solution
overdampedBase_velocity
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Florian Wiesner. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Giuseppe Sorge, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.D...
[ { "role": "assistant", "content": "```lean4\nlemma overdampedBase_velocity (IC : InitialConditions) (hS : S.IsOverdamped) :\n ∂ₜ (fun t : Time =>\n cosh (S.angularFrequency * t.val) • IC.x₀ +\n (sinh (S.angularFrequency * t.val) / S.angularFrequency) •\n (IC.v₀ + S.decayRate • IC.x₀)...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Solution
overdampedBase_acceleration
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Florian Wiesner. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Giuseppe Sorge, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.D...
[ { "role": "assistant", "content": "```lean4\nlemma overdampedBase_acceleration (IC : InitialConditions) (hS : S.IsOverdamped) :\n ∂ₜ (∂ₜ (fun t : Time =>\n cosh (S.angularFrequency * t.val) • IC.x₀ +\n (sinh (S.angularFrequency * t.val) / S.angularFrequency) •\n (IC.v₀ + S.decayRate ...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Solution
trajectory_velocity_at_zero
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Florian Wiesner. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Giuseppe Sorge, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.D...
[ { "role": "assistant", "content": "```lean4\nlemma trajectory_velocity_at_zero (IC : InitialConditions) :\n ∂ₜ (S.trajectory IC) 0 = IC.v₀ := by\n rcases S.isUnderdamped_or_isCriticallyDamped_or_isOverdamped with hS | hS | hS\n · rw [S.trajectory_eq_of_underdamped IC hS,\n exp_decay_smul_velocity ...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Solution
trajectory_equationOfMotion_of_criticallyDamped
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Florian Wiesner. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Giuseppe Sorge, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.D...
[ { "role": "assistant", "content": "```lean4\nlemma trajectory_equationOfMotion_of_criticallyDamped (IC : InitialConditions)\n (hS : S.IsCriticallyDamped) :\n S.EquationOfMotion (S.trajectory IC) := by\n rw [S.trajectory_eq_of_criticallyDamped IC hS]\n have hγ : S.γ = 2 * S.m * S.decayRate := S.gamma...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Solution
trajectory_equationOfMotion_of_underdamped
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Florian Wiesner. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Giuseppe Sorge, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.D...
[ { "role": "assistant", "content": "```lean4\nlemma trajectory_equationOfMotion_of_underdamped (IC : InitialConditions)\n (hS : S.IsUnderdamped) :\n S.EquationOfMotion (S.trajectory IC) := by\n rw [S.trajectory_eq_of_underdamped IC hS]\n have hγ : S.γ = 2 * S.m * S.decayRate := S.gamma_eq_two_mul_m_m...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Solution
trajectory_equationOfMotion_of_overdamped
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Florian Wiesner. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Giuseppe Sorge, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.D...
[ { "role": "assistant", "content": "```lean4\nlemma trajectory_equationOfMotion_of_overdamped (IC : InitialConditions)\n (hS : S.IsOverdamped) :\n S.EquationOfMotion (S.trajectory IC) := by\n rw [S.trajectory_eq_of_overdamped IC hS]\n have hγ : S.γ = 2 * S.m * S.decayRate := S.gamma_eq_two_mul_m_mul_...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Solution
trajectory_equationOfMotion
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Florian Wiesner. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Giuseppe Sorge, Florian Wiesner\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.D...
[ { "role": "assistant", "content": "```lean4\nlemma trajectory_equationOfMotion (IC : InitialConditions) :\n S.EquationOfMotion (S.trajectory IC) := by\n rcases S.isUnderdamped_or_isCriticallyDamped_or_isOverdamped with hS | hS | hS\n · exact S.trajectory_equationOfMotion_of_underdamped IC hS\n · exact...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Solution
phaseVectorField_apply
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\nmodule\npublic import Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic\npublic import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp\npublic import Mathlib.Analysis.ODE.ExistUnique\n\n@[expose] public section\n...
[ { "role": "assistant", "content": "```lean4\nlemma phaseVectorField_apply (a b : EuclideanSpace ℝ (Fin 1)) :\n S.phaseVectorField (a, b) = (b, (-(S.m⁻¹ * S.k)) • a + (-(S.m⁻¹ * S.γ)) • b) := by\n simp [phaseVectorField]\n```" } ]
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Solution
phaseCurve_hasDerivAt
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\nmodule\npublic import Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic\npublic import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp\npublic import Mathlib.Analysis.ODE.ExistUnique\n\n@[expose] public section\n...
[ { "role": "assistant", "content": "```lean4\nlemma phaseCurve_hasDerivAt (z : Time → EuclideanSpace ℝ (Fin 1))\n (hz : ContDiff ℝ ∞ z) (hEOM : S.EquationOfMotion z) (τ : ℝ) :\n HasDerivAt (fun τ : ℝ => (z (Time.toRealCLE.symm τ), ∂ₜ z (Time.toRealCLE.symm τ)))\n (S.phaseVectorField (z (Time.toRea...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Solution
equationOfMotion_unique
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\nmodule\npublic import Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic\npublic import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp\npublic import Mathlib.Analysis.ODE.ExistUnique\n\n@[expose] public section\n...
[ { "role": "assistant", "content": "```lean4\nlemma equationOfMotion_unique (x y : Time → EuclideanSpace ℝ (Fin 1))\n (hx : ContDiff ℝ ∞ x) (hy : ContDiff ℝ ∞ y)\n (hEOMx : S.EquationOfMotion x) (hEOMy : S.EquationOfMotion y)\n (h0 : x 0 = y 0) (hv0 : ∂ₜ x 0 = ∂ₜ y 0) :\n x = y := by\n have hIC ...
physlib
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Solution
trajectories_unique
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\nmodule\npublic import Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic\npublic import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp\npublic import Mathlib.Analysis.ODE.ExistUnique\n@[expose] public section\nna...
[ { "role": "assistant", "content": "```lean4\nlemma trajectories_unique (IC : InitialConditions) (x : Time → EuclideanSpace ℝ (Fin 1))\n (hx : ContDiff ℝ ∞ x) (hEOM : S.EquationOfMotion x)\n (hx0 : x 0 = IC.x₀) (hv0 : ∂ₜ x 0 = IC.v₀) :\n x = S.trajectory IC := by\n refine S.equationOfMotion_unique ...
physlib
Physlib.ClassicalMechanics.FreeParticle.Basic
accel_zero
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Pranav Magdum. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Pranav Magdum\n-/\nmodule\n\npublic import Physlib.SpaceAndTime.Time.Derivatives\npublic im...
[ { "role": "assistant", "content": "```lean4\nlemma accel_zero (s : FreeParticle) (q : Trajectory) (h : ∀ t, s.NewtonsSecondLaw q t) :\n ∀ t, deriv (deriv q) t = 0 := by\n exact fun t => (mul_eq_zero.mp (h t)).resolve_left s.mass_pos.ne'\n```" } ]
physlib
Physlib.ClassicalMechanics.FreeParticle.Basic
velocity_const_of_zero_acc
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Pranav Magdum. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Pranav Magdum\n-/\nmodule\n\npublic import Physlib.SpaceAndTime.Time.Derivatives\npublic im...
[ { "role": "assistant", "content": "```lean4\nlemma velocity_const_of_zero_acc (q : Time → ℝ) (h : ∀ t, deriv (deriv q) t = 0)\n (hcont : ContDiff ℝ 2 q) : ∃ v₀, ∀ t, deriv q t = v₀ := by\n refine ⟨deriv q 0, fun t => ?_⟩\n refine is_const_of_fderiv_eq_zero (𝕜 := ℝ) (f := deriv q) ?_ ?_ t 0\n · unfold...
physlib
Physlib.ClassicalMechanics.FreeParticle.Basic
linearMomentum_conserved_of_velocity_const
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Pranav Magdum. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Pranav Magdum\n-/\nmodule\n\npublic import Physlib.SpaceAndTime.Time.Derivatives\npublic im...
[ { "role": "assistant", "content": "```lean4\nlemma linearMomentum_conserved_of_velocity_const (s : FreeParticle) (q : Trajectory)\n (h : ∃ v₀, ∀ t, s.velocity q t = v₀) :\n ∃ p, ∀ t, s.linearMomentum q t = p := by\n obtain ⟨v₀, hv⟩ := h\n exact ⟨s.mass * v₀, fun t => by simp [linearMomentum, hv]⟩\n`...
physlib
Physlib.ClassicalMechanics.FreeParticle.Basic
linearMomentum_conserved
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Pranav Magdum. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Pranav Magdum\n-/\nmodule\n\npublic import Physlib.SpaceAndTime.Time.Derivatives\npublic im...
[ { "role": "assistant", "content": "```lean4\ntheorem linearMomentum_conserved (s : FreeParticle) (q : Trajectory)\n (h : ∀ t, s.NewtonsSecondLaw q t) (hcont : ContDiff ℝ 2 q) :\n ∃ p, ∀ t, s.linearMomentum q t = p := by\n exact linearMomentum_conserved_of_velocity_const s q\n (velocity_const_of_...
physlib
Physlib.ClassicalMechanics.FreeParticle.Basic
kineticEnergy_conserved
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Pranav Magdum. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Pranav Magdum\n-/\nmodule\n\npublic import Physlib.SpaceAndTime.Time.Derivatives\npublic im...
[ { "role": "assistant", "content": "```lean4\ntheorem kineticEnergy_conserved (s : FreeParticle) (q : Trajectory)\n (h : ∀ t, s.NewtonsSecondLaw q t) (hcont : ContDiff ℝ 2 q) :\n ∃ E, ∀ t, s.kineticEnergy q t = E := by\n obtain ⟨v₀, hv⟩ := velocity_const_of_zero_acc q (accel_zero s q h) hcont\n refin...
physlib
Physlib.ClassicalMechanics.HamiltonsEquations
hamiltonEqOp_eq
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2025 Tomas Skrivan. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Tomas Skrivan, Joseph Tooby-Smith\n-/\nmodule\n\npublic import Physlib.Mathematics.Variatio...
[ { "role": "assistant", "content": "```lean4\nlemma hamiltonEqOp_eq (H : Time → X → X → ℝ) (p : Time → X) (q : Time → X) :\n hamiltonEqOp H p q = fun t => (∂ₜ q t + -gradient (fun x => H t x (q t)) (p t),\n - ∂ₜ p t + -gradient (fun x => H t (p t) x) (q t)) := by\n rfl\n```" } ]
physlib
Physlib.ClassicalMechanics.HamiltonsEquations
hamiltonEqOp_eq_zero_iff_hamiltons_equations
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2025 Tomas Skrivan. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Tomas Skrivan, Joseph Tooby-Smith\n-/\nmodule\n\npublic import Physlib.Mathematics.Variatio...
[ { "role": "assistant", "content": "```lean4\nlemma hamiltonEqOp_eq_zero_iff_hamiltons_equations (H : Time → X → X → ℝ)\n (p : Time → X) (q : Time → X) :\n hamiltonEqOp H p q = 0 ↔\n (∀ t, ∂ₜ q t = gradient (fun x => H t x (q t)) (p t)) ∧\n (∀ t, ∂ₜ p t = -gradient (fun x => H t (p t) x) (q t)) :...
physlib
Physlib.ClassicalMechanics.HamiltonsEquations
hamiltons_equations_varGradient
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2025 Tomas Skrivan. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Tomas Skrivan, Joseph Tooby-Smith\n-/\nmodule\n\npublic import Physlib.Mathematics.Variatio...
[ { "role": "assistant", "content": "```lean4\ntheorem hamiltons_equations_varGradient\n (H : Time → X → X → ℝ) (pq : Time → X × X) (hp : ContDiff ℝ ∞ pq)\n (hL : ContDiff ℝ ∞ ↿H) :\n (δ (pq':= pq), ∫ t, ⟪(pq' t).1, ∂ₜ (Prod.snd ∘ pq') t⟫_ℝ - H t (pq' t).1 (pq' t).2) =\n fun t => hamiltonEqOp H (f...
physlib
Physlib.ClassicalMechanics.HarmonicOscillator.Geometric.Basic
ext
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Nathaneal Sajan\n-/\nmodule\n\npublic import Physlib.SpaceAndTime.Space.Ba...
[ { "role": "assistant", "content": "```lean4\nlemma ext {x y : ConfigurationSpace} (h : x.val = y.val) : x = y := by\n cases x\n cases y\n subst h\n rfl\n```" } ]
physlib
Physlib.ClassicalMechanics.HarmonicOscillator.Geometric.Basic
coe_apply
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Nathaneal Sajan\n-/\nmodule\n\npublic import Physlib.SpaceAndTime.Space.Ba...
[ { "role": "assistant", "content": "```lean4\nlemma coe_apply (x : ConfigurationSpace) (i : Fin 1) : x i = x.val i := by\n exact rfl\n```" } ]
physlib
Physlib.ClassicalMechanics.HarmonicOscillator.Geometric.Basic
toSpace_apply
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nicola Bernini. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nicola Bernini, Nathaneal Sajan\n-/\nmodule\n\npublic import Physlib.SpaceAndTime.Space.Ba...
[ { "role": "assistant", "content": "```lean4\nlemma toSpace_apply (q : ConfigurationSpace) (i : Fin 1) : q.toSpace i = q.val i := by\n exact rfl\n```" } ]
physlib
Physlib.ClassicalMechanics.HarmonicOscillator.Geometric.KineticEnergy
massMetricVal_apply
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nathaneal Sajan. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nathaneal Sajan\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.HarmonicOscillato...
[ { "role": "assistant", "content": "```lean4\nlemma massMetricVal_apply\n (S : HarmonicOscillator) (q : ConfigurationSpace)\n (v w : TangentSpace 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)) q) :\n massMetricVal S q v w = S.m * ⟪tangentCoord q v, tangentCoord q w⟫_ℝ := by\n rfl\n```" } ]
physlib
Physlib.ClassicalMechanics.HarmonicOscillator.Geometric.KineticEnergy
tangentCoord_ne_zero
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nathaneal Sajan. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nathaneal Sajan\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.HarmonicOscillato...
[ { "role": "assistant", "content": "```lean4\nlemma tangentCoord_ne_zero {q : ConfigurationSpace}\n {v : TangentSpace 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)) q}\n (hv : v ≠ 0) : tangentCoord q v ≠ 0 := by\n intro h\n apply hv\n exact (tangentCoord q).injective (by simpa using h)\n```" } ]
physlib
Physlib.ClassicalMechanics.HarmonicOscillator.Geometric.KineticEnergy
massMetricVal_pos
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nathaneal Sajan. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nathaneal Sajan\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.HarmonicOscillato...
[ { "role": "assistant", "content": "```lean4\nlemma massMetricVal_pos\n (S : HarmonicOscillator) (q : ConfigurationSpace)\n (v : TangentSpace 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)) q) (hv : v ≠ 0) :\n 0 < massMetricVal S q v v := by\n rw [massMetricVal_apply]\n exact mul_pos S.m_pos (real_inner_self_pos....
physlib
Physlib.ClassicalMechanics.HarmonicOscillator.Geometric.KineticEnergy
massMetricVal_isVonNBounded
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nathaneal Sajan. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nathaneal Sajan\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.HarmonicOscillato...
[ { "role": "assistant", "content": "```lean4\nlemma massMetricVal_isVonNBounded\n (S : HarmonicOscillator) (q : ConfigurationSpace) :\n IsVonNBounded ℝ\n {v : TangentSpace 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)) q | massMetricVal S q v v < 1} := by\n change IsVonNBounded ℝ\n {v : EuclideanSpace ℝ (Fin...
physlib
Physlib.ClassicalMechanics.HarmonicOscillator.Geometric.KineticEnergy
massMetricVal_contMDiff
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nathaneal Sajan. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nathaneal Sajan\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.HarmonicOscillato...
[ { "role": "assistant", "content": "```lean4\nlemma massMetricVal_contMDiff (S : HarmonicOscillator) :\n ContMDiff 𝓘(ℝ, EuclideanSpace ℝ (Fin 1))\n (𝓘(ℝ, EuclideanSpace ℝ (Fin 1)).prod\n 𝓘(ℝ, EuclideanSpace ℝ (Fin 1) →L[ℝ]\n EuclideanSpace ℝ (Fin 1) →L[ℝ] ℝ)) ω\n (fun q : Conf...
physlib
Physlib.ClassicalMechanics.HarmonicOscillator.Geometric.KineticEnergy
geometricKineticEnergy_eq
train
[ { "role": "user", "content": "Complete the following Lean 4 code:\n\n```lean4\n/-\nCopyright (c) 2026 Nathaneal Sajan. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Nathaneal Sajan\n-/\nmodule\n\npublic import Physlib.ClassicalMechanics.HarmonicOscillato...
[ { "role": "assistant", "content": "```lean4\nlemma geometricKineticEnergy_eq\n (S : HarmonicOscillator) (q : ConfigurationSpace)\n (v : TangentSpace 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)) q) :\n geometricKineticEnergy S q v =\n (1 / 2 : ℝ) * S.massRiemannianMetric.inner q v v := by\n rfl\n```" } ]