Datasets:
Upload folder using huggingface_hub
Browse files123# physlib-benchWork in progress.12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788---license: apache-2.0size_categories:- 1K<n<10Ktask_categories:- text-generationpretty_name: Physlib benchtags:- lean4- theorem-proving- formal-verification- physics- benchmarkconfigs:- config_name: testdata_files:- split: testpath: data/test.jsonl---# physlib-benchLean 4 tasks from [Physlib](https://github.com/leanprover-community/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`](https://github.com/leanprover-community/physlib/tree/511abd50fc240ebc93c830ef811c461f628e6d45) (2026-12-01), in `Physlib/` and `QuantumInfo/`: 239 modules.- None has the name or the statement of a theorem at [`d630c36`](https://github.com/leanprover-community/physlib/tree/d630c363063ae1de81abcf227c258e4394d50438) (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 || `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 |```pythonfrom datasets import load_datasettasks = 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.## 📊 BaselinesEach model got this prompt, with the task's `code` in place of `{}`:````textComplete 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-goedel-v2-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.## ⚖️ LicenseApache 2.0, the license of Physlib. The theorems and proofs are the work of their contributors.
README.md+86-1