ablation-eval / README.md
xcthulhu's picture
Lean proof-ablation eval: 57 repos, easy (corollary-leaves) + hard (corollary-whole) splits
658c31b verified
|
Raw
History Blame Contribute Delete
5.97 kB
metadata
license: other
license_name: multiple-upstream-licenses
language:
  - en
pretty_name: Lean Proof-Ablation Eval (57 repos, compile-validated)
tags:
  - formal-verification
  - theorem-proving
  - proof-synthesis
  - lean
  - lean4
  - ablation
task_categories:
  - text-generation
size_categories:
  - 10K<n<100K
configs:
  - config_name: default
    data_files:
      - split: easy
        path: ablation-eval/easy.jsonl
      - split: hard
        path: ablation-eval/hard.jsonl

Lean Proof-Ablation Eval

Syntactic proof-ablation challenges from 57 real Lean 4 repositories (compilers, cryptography, distributed protocols, zk circuits, program logics — see the repo list below). Each record is a (challenge, solution) pair: the challenge is a real source file with one or more lemmas deleted and their in-file users holed (sorry); the solution is the original file. A solver must re-derive the deleted lemma(s) and close the holes so the file compiles.

Every record is compile-validated: the challenge compiles with its holes AND the ground-truth solution compiles hole-free, against the repo's own built .olean closure at the pinned revision. Records whose challenge does not compile (malformed) or whose ground truth already contained a sorry/axiom (sol_bad) are excluded — only confirmed records ship here.

Splits

Both splits pick the same anchor theorems (the "corollary") and delete the same lemmas from its transitive in-file dependency closure (same seed, 42); they differ only in how the users of a deleted lemma are holed:

split mode what gets holed rows repos
easy corollary-leaves only the leaf tactic steps citing the deleted lemma; the rest of each user's proof survives 21,692 57
hard corollary-whole each user's entire proof body — solve from the statement alone 21,718 57

Ablator flags: --corollary-delete-lemmas-leaves-all (easy) / --corollary-delete-lemmas-all (hard), both with --shrink-solution-minimal --seed 42.

Row schema

Uniform across both splits (missing values are explicit nulls):

  • Task identity: task_id, challenge_id (stable join key), repo, revision, file_path, theory, proof_assistant, session, variant
  • The challenge: challenge_file_content (the file with deletions + holes), solution_file_content (ground truth), solution_diff
  • Ablation parameters: challenge_type, ablation_prob, seed, leaves_only, depth/size/centrality bounds, n_proofs, n_ablated, closure_size
  • Proof-complexity features (computed by the ablator's parser, per item): holes_filled[] (each holed user: proof_text, n_tactics, cyclomatic, n_automation, max_nesting, …), deleted_lemmas[] (each deleted lemma: text, fan_in, …), corollaries[] (the anchor theorem: n_deps_direct, n_deps_transitive, …)
  • manifest: the provenance record of the per-repo ablation run this row came from — git_repo, revision, lean_toolchain, ablator, ablator_flags, seed, validation, and counts (mined_total/good_kept/well_formed/malformed/sol_bad; the last two are 0 when no record was rejected for that reason). All rows of one repo in one split share a manifest.

Loading

from datasets import load_dataset

ds = load_dataset("for-all-dev/ablation-eval")
easy, hard = ds["easy"], ds["hard"]

# one repo's worth
ryu = easy.filter(lambda r: r["manifest"]["repo"] == "ryu-lean4")

Scoring a solver

Scoring is real compilation, not string match. The git-history-evals scaffold's ablate-baseline harness (in baselines/) consumes these JSONL files directly: it splices each challenge_file_content into a checkout of the source repo at manifest.revision (built with manifest.lean_toolchain), runs a ReAct agent to close the holes, and PASSes a record only when the finished file compiles hole-free. Repo pins for all 57 sources are in pipeline/repos.tsv; pipeline/clone_repos.sh materialises and builds them.

uv run ablate-baseline easy.jsonl data/lean/<repo> --model <model> [--repo <name>]
# the harness runs the one repo slice matching --repo (default: the src
# directory's name), selected via each row's embedded manifest

Caveat for anyone re-validating

Most apparent malformed challenges in re-runs are an artifact of an incomplete build of the source tree, not of the data: lake build only builds a lakefile's default target, so sibling modules can be left uncompiled and every challenge importing one fails with object file ... does not exist. Build the full closure before trusting a malformed count.

Contamination note

All 57 upstream repos are public OSS and likely present in frontier-model pretraining corpora. The ablations are syntactic and freshly generated (deleted lemmas + holed users at a pinned revision), which makes verbatim recall less useful than for git-history data, but prefer relative comparisons (easy vs hard, across models) over absolute scores.

Attribution & licenses

Each row carries its upstream provenance in manifest.git_repo + manifest.revision. The 57 upstream repositories are distributed under their own licenses (Apache-2.0, MIT, BSD, and others — see each repo); rows redistribute excerpts of upstream source and are bound by the corresponding upstream terms. Use for research/evaluation.

Mining scaffold: for-all-dev/git-history-evals (Forall R&D).

@misc{lean-ablation-eval,
  title  = {Lean Proof-Ablation Eval (57 repos, compile-validated)},
  author = {Dougherty, Quinn and Doty, Matthew},
  year   = {2026},
  howpublished = {\url{https://huggingface.co/datasets/for-all-dev/ablation-eval}},
  note   = {Syntactic corollary-anchored ablations over 57 Lean 4 repositories}
}