Dataset Viewer
Auto-converted to Parquet Duplicate
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```" } ]
End of preview. Expand in Data Studio

hilbert-libraries

Theorems from Physlib and CSLib as prompt/completion pairs, for training Hilbert, a Lean 4 prover. Each prompt is the source file up to a theorem, with the proof replaced by sorry, in the prompt format of Goedel-LM/Goedel-Prover-V2-8B. The completion is the theorem with the library's own proof.

Library Commit Lean Folders Train Test
physlib d630c36 v4.34.1 Physlib/, QuantumInfo/ 8,162 1,005
cslib cd62719 v4.35.0-rc3 Cslib/ 2,227 283

πŸ“„ Rows

Field Content
library physlib or cslib
module Source file as a module name, such as Physlib.ClassicalMechanics.EulerLagrange
name Theorem or lemma name
split train, or test for held-out modules
prompt One user message: the file up to the theorem, ending in := by sorry
completion One assistant message: a lean4 block with the statement and its proof
from datasets import load_dataset

data = load_dataset("jgalego/hilbert-libraries")

prompt and completion follow the conversational prompt/completion format of TRL's SFTTrainer.

πŸ”§ How it is built

  • Top-level theorem and lemma declarations in the folders above: 11,677 kept of 11,915. A theorem is skipped if its proof uses sorry or admit, works by pattern matching or recursion, or has no top-level :=.
  • Term proofs become exact tactics, so every completion continues the prompt's := by.
  • Context longer than 20,000 characters is cut at a top-level line outside comments. Imports and scope commands from the cut part (namespace, section, open, variable, notation) are kept, so names still resolve. Prompts run to 7,031 characters at the median and 23,307 at most.
  • The test split holds out about a tenth of the modules whole, chosen by the SHA-256 of the module name, so no test theorem shares a file with a training one.
  • Proofs are not re-checked: the libraries' CI compiles them. A prompt with cut context may not compile on its own.

βš–οΈ License

Apache 2.0, the license of both libraries. The theorems and proofs are the work of their contributors.

Downloads last month
36

Models trained or fine-tuned on jgalego/hilbert-libraries

Collection including jgalego/hilbert-libraries