Datasets:
Docs: explain LeanTransitionCorpus for ATP training
Browse files12 unmodified lines1314151617181920212214 unmodified lines37383940414212 unmodified lines# LeanTransitionCorpusIncrementally published archival Lean proof transitions. **Partial extraction;not the complete planned corpus.** Original source and environment provenance areretained per row. The existing repository license metadata is preserved; sourcecorpus licenses and restrictions still apply and are not replaced by this card.## Format14 unmodified linesidentity of the provenance-based proof key plus `step_index`, prefixed by`ltc-v2:`. The earlier colliding source IDs are not retained in another column.Each shard is round-trip compared against every original JSON row before upload.Remote bytes are streamed back and checked for SHA-256 and size at a pinned commit.`manifests/batches/` records verified shard hashes/revisions, original batch12 unmodified lines1314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666714 unmodified lines82838485868788899091929394959697989910010110210310410510610710810912 unmodified lines# LeanTransitionCorpus> **Status: incremental upload in progress.** This repository is useful now, but> it is not the complete planned corpus. Counts, source coverage, and shard> inventory will grow as verified batches are added.LeanTransitionCorpus is a dataset for training and studying automated theoremproving systems in Lean. Its unit of data is one tactic transition: the proof statebefore a tactic, the tactic that was executed, and the resulting state. This makesit suitable for tactic prediction, proof-state representation learning, premiseselection, retrieval, verification, and trajectory-level training.Many Lean datasets expose a theorem, tactic, and pretty-printed goal strings. Thiscorpus retains those human-readable views, but also preserves richer informationfrom Lean's elaborator: the tactic `Syntax` tree, resolved identifiers, recursiveLean `Expr` trees, local context, metavariables, universe metavariables, sourceranges, and premise/context information. The extra representations make itpossible to investigate models that use Lean's internal structure rather thanrecovering it from printed text.Original source and environment provenance are retained per row. The repository'sMIT metadata applies to this packaging; source corpus licenses and restrictionsremain applicable and are not replaced by this card.## Source datasetsThe extraction pipeline draws from pinned snapshots of the following Lean sources.Rows identify their origin in `source_dataset`, `source_url`, `repo_commit`, andtoolchain columns. Coverage is incremental: a source listed here may have lesspublished coverage than another at any point in time.| Source | Role in the corpus ||---|---|| NuminaMath-CoT | Lean formalizations from the Numina mathematical reasoning corpus. This is the source of the initial uploaded seed. || DeepSeek-Prover | Lean proof data used to broaden theorem and tactic coverage. || Goedel Lean Workbook | Lean workbook proofs, retained as a separately attributable source. || Mathlib | The pinned Mathlib snapshot supplies the theorem-proving environment and contributes directly extracted Mathlib theorems. |## How the data is producedFor each selected theorem, the extractor runs the matching pinned Lean and Mathlibenvironment, records the sequence of tactic-state transitions, and canonicalizesthe result into one row per transition. It validates internal-state structure andcontinuity between adjacent transitions, assigns deterministic splits, and keepsprovenance needed to trace a row back to its source theorem and environment.Rows are written as Parquet shards. Before publication, every shard is checkedagainst its source rows; uploaded bytes are read back and verified at an immutableHugging Face revision. Batch manifests record shard hashes, source-batch identity,and extraction evidence. A `replay_status` value records whether an additionalreplay check was performed; publication alone does not mean replay certification.## Format14 unmodified linesidentity of the provenance-based proof key plus `step_index`, prefixed by`ltc-v2:`. The earlier colliding source IDs are not retained in another column.## Schema in plain languageEach row is a single ordered step within a proof. The fields fall into these groups:| Fields | Meaning ||---|---|| `example_id`, `proof_id`, `step_index`, `split`, `schema_version` | Stable identity, position in the proof, dataset split, and format version. `example_id` is globally unique; `proof_id` alone may not be. || `source_dataset`, `source_url`, `repo_commit`, `file_path`, `lean_version`, `mathlib_version`, `extractor_version`, `pantograph_version`, `provenance` | Where the theorem came from and the exact environment and extraction provenance needed to reproduce or audit it. || `theorem_name`, `theorem_statement_raw`, `theorem_source_raw`, `namespace`, `imports` | The theorem and its surrounding Lean source context. || `state_before_raw`, `tactic_raw`, `state_after_raw` | The familiar human-readable goal display and tactic text for the transition. || `state_before_structured`, `state_after_structured` | Parsed versions of the displayed proof states. || `state_before_internal`, `state_after_internal` | Lean's detailed elaborator state: active goals, local declarations, targets, metavariables, universe metavariables, and recursive expressions. || `atomic_tactics`, `tactic_internal` | The tactic's atomic view and its full Lean `Syntax` representation, including identifier resolution, premise references, and nested tactic structure when available. || `used_premises`, `available_context`, `source_start`, `source_end` | Referenced declarations, candidate context, and the tactic's source span. || `terminal`, `terminal_marker`, `terminal_raw` | Whether this step closes the proof and the source/display marker associated with closure. || `theorem_fingerprint`, `state_fingerprint`, `transition_fingerprint` | Deterministic hashes useful for deduplication, grouping, and integrity checks. || `replay_status`, `replay_error` | Result of optional replay validation; `not_run` means no independent replay was attempted. |The recursive structures are stored as lossless JSON strings in Parquet. Parse themwith `json.loads` when you need their tree structure; leave them as strings fortext-only training baselines.Each shard is round-trip compared against every original JSON row before upload.Remote bytes are streamed back and checked for SHA-256 and size at a pinned commit.`manifests/batches/` records verified shard hashes/revisions, original batch
README.md+71-4