File size: 1,534 Bytes
bb32dce
 
 
 
 
 
 
 
 
 
 
 
 
907c821
 
 
 
 
bb32dce
 
 
 
 
 
 
 
907c821
bb32dce
907c821
 
 
 
 
 
bb32dce
 
 
 
 
 
 
 
 
 
 
 
 
 
 
907c821
bb32dce
 
 
 
 
907c821
 
 
 
bb32dce
 
907c821
 
 
 
 
 
 
bb32dce
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
license: apache-2.0
task_categories:
  - text-generation
language:
  - en
tags:
  - lean4
  - theorem-proving
  - code-generation
  - benchmark
size_categories:
  - n<1K
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*.parquet
---

# LeanBench Dataset

A benchmark dataset for evaluating AI systems on Lean 4 theorem proving tasks.

## Dataset Description

This dataset contains **482 tasks** extracted from real Lean 4 pull requests.

## Files

- `leanbench_tasks.csv` - Full dataset in CSV format
- `data/train-00000-of-00001.parquet` - Dataset in Parquet format (for `datasets` library)

## Task Format

Each row represents a single task with the following key fields:

| Field | Description |
|-------|-------------|
| `task_id` | Unique identifier (e.g., LB-0001) |
| `task_type` | Type of task (e.g., pr_completion) |
| `difficulty` | Difficulty level (easy/medium/hard) |
| `difficulty_score` | Numeric difficulty score |
| `repo` | Source GitHub repository |
| `pr_number` | Pull request number |
| `problem_statement` | Natural language description of the task |
| `golden_patch` | Expected solution (diff format) |
| `verification_command` | Command to verify the solution |

## Usage

```python
from datasets import load_dataset

dataset = load_dataset("foundry-ai/leanbench")

# Access tasks
for task in dataset["train"]:
    print(task["task_id"], task["difficulty"])
```

## Statistics

- Total tasks: 482
- Easy: 330
- Medium: 121
- Hard: 31

## License

Apache 2.0