Lean4-Stdlib / README.md
phanerozoic's picture
Add dataset card
6bcd278 verified
metadata
license: apache-2.0
task_categories:
  - text-generation
  - feature-extraction
language:
  - en
tags:
  - theorem-proving
  - formal-methods
  - lean4
  - standard-library
size_categories:
  - 10K<n<100K

Lean4-Stdlib

Structured dataset of definitions and theorems from the Lean 4 standard library (Init + Std).

Dataset Description

  • Source: leanprover/lean4 (src/Init + src/Std)
  • Entries: 40,600
  • Files processed: 900 (507 Init + 393 Std)
  • License: Apache 2.0

Schema

Column Type Description
fact string Declaration body (without type keyword)
type string theorem, def, class, structure, instance, inductive, abbrev, axiom, opaque
library string Init.* or Std.* module
imports list Import statements
filename string Source file path
symbolic_name string Declaration identifier
docstring string Documentation comment (16% coverage)

Statistics

By Type

Type Count
theorem 31,887
def 6,600
instance 426
abbrev 425
opaque 399
structure 382
class 302
inductive 163
axiom 16

Docstring Coverage

  • 6,651 entries with docstrings (16%)

Use Cases

  • Retrieval/RAG for Lean 4
  • Learning core Lean 4 patterns
  • Training embeddings for formal proofs
  • API exploration

Related Datasets