Dataset Viewer
Auto-converted to Parquet Duplicate
library
stringclasses
1 value
module
stringclasses
239 values
name
stringlengths
6
67
split
stringclasses
1 value
code
stringlengths
820
21.1k
completion
stringlengths
50
3.59k
id
stringlengths
31
121
names
listlengths
1
1
physlib-new
Physlib.ClassicalFieldTheory.GaugeTheory.GlobalGaugeGroup.Basic
mem_ofSubmonoid_iff
test
/- Copyright (c) 2026 Joseph Tooby-Smith. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jinzheng Li, Nathaneal Sajan, Joseph Tooby-Smith -/ module public import Mathlib.Topology.Algebra.Group.ClosedSubgroup public import Mathlib.LinearAlgebra.UnitaryGroup public impo...
```lean4 lemma mem_ofSubmonoid_iff {S : Submonoid (Matrix κ κ ℂ)} {hS : IsClosed (S : Set (Matrix κ κ ℂ))} {g : GeneralLinearGroup κ ℂ} : g ∈ (ofSubmonoid S hS).toSubgroup ↔ (g : Matrix κ κ ℂ) ∈ S ∧ (↑g⁻¹ : Matrix κ κ ℂ) ∈ S := by exact Iff.rfl ```
Physlib.ClassicalFieldTheory.GaugeTheory.GlobalGaugeGroup.Basic:mem_ofSubmonoid_iff
[ "mem_ofSubmonoid_iff" ]
physlib-new
Physlib.ClassicalFieldTheory.GaugeTheory.GlobalGaugeGroup.Basic
mem_ofSubmonoid_iff_of_star_mem
test
/- Copyright (c) 2026 Joseph Tooby-Smith. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jinzheng Li, Nathaneal Sajan, Joseph Tooby-Smith -/ module public import Mathlib.Topology.Algebra.Group.ClosedSubgroup public import Mathlib.LinearAlgebra.UnitaryGroup public impo...
```lean4 lemma mem_ofSubmonoid_iff_of_star_mem {S : Submonoid (Matrix κ κ ℂ)} {hS : IsClosed (S : Set (Matrix κ κ ℂ))} (hU : S ≤ unitaryGroup κ ℂ) (hstar : ∀ A ∈ S, star A ∈ S) {g : GeneralLinearGroup κ ℂ} : g ∈ (ofSubmonoid S hS).toSubgroup ↔ (g : Matrix κ κ ℂ) ∈ S := by refine ⟨fun h => h.1, fun h => me...
Physlib.ClassicalFieldTheory.GaugeTheory.GlobalGaugeGroup.Basic:mem_ofSubmonoid_iff_of_star_mem
[ "mem_ofSubmonoid_iff_of_star_mem" ]
physlib-new
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic
eval_surjective
test
/- Copyright (c) 2026 Joseph Tooby-Smith. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jinzheng Li, Nathaneal Sajan, Joseph Tooby-Smith -/ module public import Mathlib.Algebra.Lie.Basic public import Mathlib.Basic.Real.Basic public import Mathlib.RepresentationTheor...
```lean4 lemma eval_surjective : Function.Surjective jets.eval := by exact Function.LeftInverse.surjective jets.eval_ofConstant ```
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic:eval_surjective
[ "eval_surjective" ]
physlib-new
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic
ofConstant_injective
test
/- Copyright (c) 2026 Joseph Tooby-Smith. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jinzheng Li, Nathaneal Sajan, Joseph Tooby-Smith -/ module public import Mathlib.Algebra.Lie.Basic public import Mathlib.Basic.Real.Basic public import Mathlib.RepresentationTheor...
```lean4 lemma ofConstant_injective : Function.Injective jets.ofConstant := by exact Function.LeftInverse.injective jets.eval_ofConstant ```
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic:ofConstant_injective
[ "ofConstant_injective" ]
physlib-new
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic
evalLie_surjective
test
/- Copyright (c) 2026 Joseph Tooby-Smith. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jinzheng Li, Nathaneal Sajan, Joseph Tooby-Smith -/ module public import Mathlib.Algebra.Lie.Basic public import Mathlib.Basic.Real.Basic public import Mathlib.RepresentationTheor...
```lean4 lemma evalLie_surjective : Function.Surjective jets.evalLie := by exact Function.LeftInverse.surjective jets.evalLie_ofConstantLie ```
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic:evalLie_surjective
[ "evalLie_surjective" ]
physlib-new
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic
ofConstantLie_injective
test
/- Copyright (c) 2026 Joseph Tooby-Smith. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jinzheng Li, Nathaneal Sajan, Joseph Tooby-Smith -/ module public import Mathlib.Algebra.Lie.Basic public import Mathlib.Basic.Real.Basic public import Mathlib.RepresentationTheor...
```lean4 lemma ofConstantLie_injective : Function.Injective jets.ofConstantLie := by exact Function.LeftInverse.injective jets.evalLie_ofConstantLie ```
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic:ofConstantLie_injective
[ "ofConstantLie_injective" ]
physlib-new
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic
adjoint_bracket
test
/- Copyright (c) 2026 Joseph Tooby-Smith. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jinzheng Li, Nathaneal Sajan, Joseph Tooby-Smith -/ module public import Mathlib.Algebra.Lie.Basic public import Mathlib.Basic.Real.Basic public import Mathlib.RepresentationTheor...
```lean4 lemma adjoint_bracket (g : G₀) (a b : 𝔤) : jets.adjoint g ⁅a, b⁆ = ⁅jets.adjoint g a, jets.adjoint g b⁆ := by have h := jets.evalLie_adjointJ (jets.ofConstant g) rw [jets.eval_ofConstant] at h rw [← jets.evalLie_ofConstantLie ⁅a, b⁆, ← h, LieHom.map_lie jets.ofConstantLie, jets.adjointJ_bracket,...
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic:adjoint_bracket
[ "adjoint_bracket" ]
physlib-new
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic
deriv_adjointJ_ofConstant
test
/- Copyright (c) 2026 Joseph Tooby-Smith. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jinzheng Li, Nathaneal Sajan, Joseph Tooby-Smith -/ module public import Mathlib.Algebra.Lie.Basic public import Mathlib.Basic.Real.Basic public import Mathlib.RepresentationTheor...
```lean4 lemma deriv_adjointJ_ofConstant (g : G₀) (μ : Fin 1 ⊕ Fin 3) (x : 𝔤J) : jets.deriv μ (jets.adjointJ (jets.ofConstant g) x) = jets.adjointJ (jets.ofConstant g) (jets.deriv μ x) := by rw [jets.deriv_adjointJ, jets.maurerCartan_ofConstant, zero_lie, sub_zero] ```
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic:deriv_adjointJ_ofConstant
[ "deriv_adjointJ_ofConstant" ]
physlib-new
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic
iteratedDeriv_cons_eq_comp_deriv
test
/- Copyright (c) 2026 Joseph Tooby-Smith. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jinzheng Li, Nathaneal Sajan, Joseph Tooby-Smith -/ module public import Mathlib.Algebra.Lie.Basic public import Mathlib.Basic.Real.Basic public import Mathlib.RepresentationTheor...
```lean4 lemma iteratedDeriv_cons_eq_comp_deriv (μ : Fin 1 ⊕ Fin 3) (s : Multiset (Fin 1 ⊕ Fin 3)) : jets.iteratedDeriv (μ ::ₘ s) = (jets.iteratedDeriv s).comp (jets.deriv μ) := by rw [show (μ ::ₘ s : Multiset (Fin 1 ⊕ Fin 3)) = s + {μ} from by rw [add_comm, Multiset.singleton_add], iteratedDeriv_add, i...
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic:iteratedDeriv_cons_eq_comp_deriv
[ "iteratedDeriv_cons_eq_comp_deriv" ]
physlib-new
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic
iteratedDeriv_bracket
test
/- Copyright (c) 2026 Joseph Tooby-Smith. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jinzheng Li, Nathaneal Sajan, Joseph Tooby-Smith -/ module public import Mathlib.Algebra.Lie.Basic public import Mathlib.Basic.Real.Basic public import Mathlib.RepresentationTheor...
```lean4 lemma iteratedDeriv_bracket (s : Multiset (Fin 1 ⊕ Fin 3)) (a b : 𝔤J) : jets.iteratedDeriv s ⁅a, b⁆ = (s.antidiagonal.map fun p => ⁅jets.iteratedDeriv p.1 a, jets.iteratedDeriv p.2 b⁆).sum := by induction s using Multiset.induction_on with | empty => simp [Multiset.antidiagonal_zero] |...
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic:iteratedDeriv_bracket
[ "iteratedDeriv_bracket" ]
physlib-new
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic
iteratedDeriv_ofConstantLie_of_ne_zero
test
/- Copyright (c) 2026 Joseph Tooby-Smith. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jinzheng Li, Nathaneal Sajan, Joseph Tooby-Smith -/ module public import Mathlib.Algebra.Lie.Basic public import Mathlib.Basic.Real.Basic public import Mathlib.RepresentationTheor...
```lean4 lemma iteratedDeriv_ofConstantLie_of_ne_zero {p : Multiset (Fin 1 ⊕ Fin 3)} (hp : p ≠ 0) (a : 𝔤) : jets.iteratedDeriv p (jets.ofConstantLie a) = 0 := by induction p using Multiset.induction_on with | empty => exact absurd rfl hp | cons μ t ih => rw [iteratedDeriv_cons, LinearMap.comp_apply] ...
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic:iteratedDeriv_ofConstantLie_of_ne_zero
[ "iteratedDeriv_ofConstantLie_of_ne_zero" ]
physlib-new
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic
iteratedDeriv_adjointJ_ofConstant
test
/- Copyright (c) 2026 Joseph Tooby-Smith. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jinzheng Li, Nathaneal Sajan, Joseph Tooby-Smith -/ module public import Mathlib.Algebra.Lie.Basic public import Mathlib.Basic.Real.Basic public import Mathlib.RepresentationTheor...
```lean4 lemma iteratedDeriv_adjointJ_ofConstant (g : G₀) (s : Multiset (Fin 1 ⊕ Fin 3)) (x : 𝔤J) : jets.iteratedDeriv s (jets.adjointJ (jets.ofConstant g) x) = jets.adjointJ (jets.ofConstant g) (jets.iteratedDeriv s x) := by induction s using Multiset.induction_on with | empty => simp | cons μ s ih =>...
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic:iteratedDeriv_adjointJ_ofConstant
[ "iteratedDeriv_adjointJ_ofConstant" ]
physlib-new
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic
evalLie_iteratedDeriv_mulCoord
test
/- Copyright (c) 2026 Joseph Tooby-Smith. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jinzheng Li, Nathaneal Sajan, Joseph Tooby-Smith -/ module public import Mathlib.Algebra.Lie.Basic public import Mathlib.Basic.Real.Basic public import Mathlib.RepresentationTheor...
```lean4 lemma evalLie_iteratedDeriv_mulCoord (μ : Fin 1 ⊕ Fin 3) (s : Multiset (Fin 1 ⊕ Fin 3)) (a : 𝔤J) : jets.evalLie (jets.iteratedDeriv s (jets.mulCoord μ a)) = s.count μ • jets.evalLie (jets.iteratedDeriv (s.erase μ) a) := by induction s using Multiset.induction_on generalizing a with | empty => si...
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic:evalLie_iteratedDeriv_mulCoord
[ "evalLie_iteratedDeriv_mulCoord" ]
physlib-new
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic
lie_adjoint
test
/- Copyright (c) 2026 Joseph Tooby-Smith. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jinzheng Li, Nathaneal Sajan, Joseph Tooby-Smith -/ module public import Mathlib.Algebra.Lie.Basic public import Mathlib.Basic.Real.Basic public import Mathlib.RepresentationTheor...
```lean4 lemma lie_adjoint (g : G₀) (x : 𝔤) : f.lie (jets.adjoint g x) = jets'.adjoint (f.group g) (f.lie x) := by have h := jets.evalLie_adjointJ (jets.ofConstant g) (jets.ofConstantLie x) rw [jets.eval_ofConstant, jets.evalLie_ofConstantLie] at h rw [← h, ← f.evalLie_lieJ, f.lieJ_adjointJ, f.groupJ_ofConst...
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic:lie_adjoint
[ "lie_adjoint" ]
physlib-new
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic
lieJ_iteratedDeriv
test
/- Copyright (c) 2026 Joseph Tooby-Smith. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jinzheng Li, Nathaneal Sajan, Joseph Tooby-Smith -/ module public import Mathlib.Algebra.Lie.Basic public import Mathlib.Basic.Real.Basic public import Mathlib.RepresentationTheor...
```lean4 lemma lieJ_iteratedDeriv (s : Multiset (Fin 1 ⊕ Fin 3)) (a : 𝔤J) : f.lieJ (jets.iteratedDeriv s a) = jets'.iteratedDeriv s (f.lieJ a) := by induction s using Multiset.induction_on generalizing a with | empty => simp | cons μ t ih => rw [iteratedDeriv_cons, iteratedDeriv_cons, LinearMap.comp_appl...
Physlib.ClassicalFieldTheory.GaugeTheory.LocalGaugeData.Basic:lieJ_iteratedDeriv
[ "lieJ_iteratedDeriv" ]
physlib-new
Physlib.ClassicalMechanics.ConfigurationSpace.Variation
contDiff_comp_vadd
test
/- Copyright (c) 2026 Michal Mogielnicki. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michal Mogielnicki -/ module public import Mathlib.Geometry.Manifold.Algebra.SMul public import Physlib.ClassicalMechanics.ConfigurationSpace.Basic public import Physlib.SpaceAndT...
```lean4 lemma contDiff_comp_vadd {γ : Time → E} {t₀ t₁ : Time} (h : Variation (M := ⟨E⟩) 𝓘(ℝ, E) γ t₀ t₁) : ContDiff ℝ ∞ (fun p : ℝ × ℝ ↦ h.toFun (p.1, p.2 +ᵥ t₀)) := by have key (f : ℝ × ℝ → E) (hf : ContMDiff (𝓘(ℝ, ℝ).prod 𝓘(ℝ, ℝ)) 𝓘(ℝ, E) ∞ f) : ContDiff ℝ ∞ f := by rwa [← modelWithCornersSe...
Physlib.ClassicalMechanics.ConfigurationSpace.Variation:contDiff_comp_vadd
[ "contDiff_comp_vadd" ]
physlib-new
Physlib.ClassicalMechanics.ConfigurationSpace.Variation
exists_bump
test
/- Copyright (c) 2026 Michal Mogielnicki. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michal Mogielnicki -/ module public import Mathlib.Geometry.Manifold.Algebra.SMul public import Physlib.ClassicalMechanics.ConfigurationSpace.Basic public import Physlib.SpaceAndT...
```lean4 lemma exists_bump {γ : Time → E} {t₀ t₁ : Time} (hγ : ContMDiff 𝓘(ℝ, ℝ) 𝓘(ℝ, E) ∞ γ) {ψ : ℝ → ℝ} (hψ : ContDiff ℝ ∞ ψ) (hs : tsupport ψ ⊆ Ioo 0 (t₁ -ᵥ t₀)) (w : E) : ∃ h : Variation (M := ⟨E⟩) 𝓘(ℝ, E) γ t₀ t₁, ∀ s τ, h.toFun (s, τ +ᵥ t₀) = γ (τ +ᵥ t₀) + s • (ψ τ • w) := by have hψt : ContMDi...
Physlib.ClassicalMechanics.ConfigurationSpace.Variation:exists_bump
[ "exists_bump" ]
physlib-new
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic
energy_balance
test
/- Copyright (c) 2026 Nicola Bernini. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nicola Bernini, Florian Wiesner -/ module public import Physlib.ClassicalMechanics.HarmonicOscillator.Basic /-! # The damped harmonic oscillator The equation of motion, energy dissi...
```lean4 lemma energy_balance (xₜ : Time → EuclideanSpace ℝ (Fin 1)) (hEOM : S.EquationOfMotion xₜ) (hx : ContDiff ℝ ∞ xₜ) (a b : ℝ) : S.energy xₜ ⟨b⟩ - S.energy xₜ ⟨a⟩ = -S.γ * ∫ t in a..b, ‖∂ₜ xₜ ⟨t⟩‖ ^ 2 := by have hd (t : ℝ) : HasDerivAt (fun s : ℝ => S.energy xₜ ⟨s⟩) (-S.γ * ‖∂ₜ xₜ ⟨t⟩‖ ^ 2) ...
Physlib.ClassicalMechanics.DampedHarmonicOscillator.Basic:energy_balance
[ "energy_balance" ]
End of preview. Expand in Data Studio

physlib-bench

Lean 4 tasks from Physlib for testing provers: 1,251 theorems added to the library after a cutoff, so a model trained before it cannot have seen them. A task is the source file up to a theorem, ending in sorry. The model writes the proof and Lean checks it.

📚 What is in it

  • Theorems and lemmas from Physlib at 511abd5 (2026-12-01), in Physlib/ and QuantumInfo/: 239 modules.
  • None has the name or the statement of a theorem at d630c36 (2026-10-02), in Physlib/, QuantumInfo/ or PhyslibAlpha/. Statements are compared without names, comments or whitespace.
  • Checked on Lean v4.36.0. A task stays in only if the library's own proof compiles there and #print axioms shows nothing beyond propext, Classical.choice and Quot.sound.
  • By area: Relativity 239, Mathematics 210, ProbabilisticTheory 167, QuantumMechanics 156, SpaceAndTime 155, ClassicalMechanics 95, Cosmology 63, CondensedMatter 58, Units 31, QuantumInfo 29, Particles 16, ClassicalFieldTheory 15, Optics 11, Electromagnetism 4, StatisticalMechanics 2.
Field Content
library physlib-new
module Source file as a module name, such as Physlib.Relativity.Tensors.Conjugation.Basic
name Theorem or lemma name
id module:name, unique
names The names whose axioms are checked: the theorem's
split test
code The file up to the theorem, ending in := by sorry
completion A lean4 block with the statement and the library's own proof
from datasets import load_dataset

tasks = load_dataset("jgalego/physlib-bench", "test", split="test")

🔧 How the tasks are built

  • Top-level theorem and lemma declarations with a full proof. Proofs by pattern matching, recursion or a structure instance are skipped, and so are names declared twice in a file.
  • Term proofs become exact tactics, so every completion continues the code'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 are kept.
  • A theorem can depend on definitions and lemmas added earlier in the same file. The context contains them unless it was cut.

📊 Baselines

Each model got this prompt, with the task's code in place of {}:

Complete the following Lean 4 code:

```lean4
{}```

Before producing the Lean 4 code to formally prove the given theorem, provide a detailed proof plan outlining the main proof steps and strategies.
The plan should highlight key ideas, intermediate lemmas, and proof structures that will guide the construction of the final formal proof.

Four samples per theorem at temperature 0.6 and top-p 0.95, up to 8,192 new tokens, and a response cut off at the limit scores nothing. A proof counts if the file compiles within 300 seconds and the axiom check passes. pass@1 is estimated from the samples.

Plain automation is one answer for every theorem, with no model: first | rfl | simp | grind | aesop | simp_all | norm_num | omega | linarith | positivity. It closes 194 of 1,251. The difference is the mean over theorems of a model's pass rate minus the base model's, with its standard error. The last columns are pass@1 on the 1,057 theorems automation leaves open, the mean response length in tokens and the share of responses cut off.

Model pass@1 pass@n Difference to the first row pass@1 where automation fails Mean tokens Cut off
Goedel-Prover-V2-8B 0.117 0.230 n/a 0.075 4,231 33%
jgalego/hilbert-prover-8b 0.310 0.362 +0.193 ± 0.011 0.216 234 1%
Plain automation, no model 0.155 n/a +0.038 ± 0.010 0.000 0 0%

⚠️ Limits

  • One snapshot. A refresh needs a new cutoff and new baselines.
  • The cutoff protects models trained before 2026-10-02. Pull requests are public before they merge, so a theorem merged just after the cutoff may have been visible earlier.
  • Provers trained on older Lean and Mathlib fail some tasks on renamed or removed lemmas, not on the maths.
  • Many tasks are short. Plain automation closes about 15%, so the "automation fails" column is the one that shows what a model adds beyond tactics.
  • Single theorems, not whole projects.

⚖️ License

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

Downloads last month
35

Collection including jgalego/physlib-bench