{"success":true,"data":{"author":"Mathlib Initiative (extraction); leanprover-community Mathlib contributors","bucketAccessType":"public","bucketName":"mathlib-initiative/mathlib-tactics","bucketPrefix":"","category":"Mathematics","cloudProvider":"huggingface","createdAt":"2026-11-21T22:16:38.054Z","description":"Every tactic invocation in Mathlib, the community library of formalized mathematics for the Lean 4 interactive theorem prover, paired with the proof goals before and after the step. The rows were extracted with the lean_scout tool from Mathlib commit fc4f59e5 (Lean v4.36.0), and there are about 2.02 million of them. Each row gives the module, source start and end positions, the pretty-printed tactic text (ppTac), its elaborator and syntax kind, the list of goals it acted on (pretty-printed hypotheses and target, the term each goal was assigned, and the constants and free variables used), and the goals left afterwards. This is the standard kind of training and evaluation data for neural theorem proving, tactic prediction and premise selection, which means learning which proof step a mathematician would write next in a formal proof. The data is in about 250 Parquet shards plus a manifest.json; read it with pyarrow, pandas or Hugging Face datasets. Mathlib is released under the Apache-2.0 license by the leanprover-community. Cite the Mathlib paper (The Lean Mathematical Library, CPP 2020, doi 10.1145/3372885.3373824) or the mathlib4 repository.","displayTitle":"Mathlib Tactics: Lean 4 Proof Steps with Goal States from the Mathlib Library (Mathlib Initiative)","huggingFaceUrl":"https://huggingface.co/datasets/mathlib-initiative/mathlib-tactics","id":"cca6be2e-ed42-5e7e-8857-018af92117e6","license":"Apache-2.0","licenseEvidenceUrl":"https://github.com/leanprover-community/mathlib4/blob/master/LICENSE","objectCountEstimate":259,"probeStatus":"ok","referenceUrl":"https://doi.org/10.1145/3372885.3373824","region":"us","schemaCard":{"accessHints":[{"language":"python-datasets","snippet":"from datasets import load_dataset\nds = load_dataset(\"mathlib-initiative/mathlib-tactics\")"},{"language":"python-hub","snippet":"from huggingface_hub import snapshot_download\nsnapshot_download(repo_id=\"mathlib-initiative/mathlib-tactics\", repo_type=\"dataset\")"}],"caveats":["HuggingFace metadata: author=mathlib-initiative, license:apache-2.0, size_categories:1M<n<10M, format:parquet, downloads=3366"],"format":"mixed","generatedAt":"2026-11-21T22:31:54.216Z","layout":{"example":"part-000.parquet","pattern":"{repoId}/{filename}"},"mountPath":"/mnt/archive","sampleHeaders":[{"bytes":"5041523115041598ee0115ce3e4c15ae06150012000028b52ffd608c3aed7c003a81d01631808c197103980409922d392005add9479f6718591cff3532a6375e3447dde0db11c7103b13b1eddbe4936ae596724b03115b0162015d01cf51c5c567c5212bf01271a9717d8e7833e3b4fac4a9ae9b23435fddf5dad93897dcfbdbb89d029a7e68e38869b5ff3961afd445d3c6b121e7d482952f62b0716c8e8d4724f64a2d9860fdf5bd0ddce7c885cb6ab9399d8c4ba4aeb6647e2db41671d0b6b929184e17b2784dc101464e232034758de3852bb008af296cbc35638124c5537927f99e4ed84e16eeb2efaae148e375f3eb394960f04861e04835fb0b39fdd52708cfd1a7c4d4c5d69494f4e37bedc05fae1091d26b0a14ac1a097b8e58054712166fe5613aec5382187d1eb4eb85ccaf0588c42f47ec396aed0b76e20829dc0d5ae94e5fad3fd40a7ba5205ea41c2cdedf280509ee6f6e0a736dee31e1ba391c5ebaea43e216b7c3aafd2a2d1610a34f03173199df8418f77e1571a0d9a841f2c0bd9f4e2bac5aab270c34c34e3842ac5a981c1210a30fbb627b074bbfa8e5229556369ebc1cec5362f9f9b0cbbacc27458102051101ac8df5d2c69184b73e551a01e3852628361403efaf3482f68b17cac88be2bdbc76086004443460407419817e740d2f11f60002f7fee5c1ae2b425e8862a33fab6d1c7d4b06a8c559d1","encoding":"hex","key":"part-000.parquet","truncatedAt":512}],"sampleObjects":["part-000.parquet","part-001.parquet","part-002.parquet","part-003.parquet","part-004.parquet"],"sidecars":[{"bytes":"---\nlicense: apache-2.0\nlanguage:\n  - en\ntags:\n  - lean4\n  - mathlib\n  - theorem-proving\n  - formal-mathematics\npretty_name: Mathlib Tactics\n---\n\n# Mathlib Tactics\n\nThis dataset contains tactic invocations with associated goal states from proofs in [Mathlib](https://github.com/leanprover-community/mathlib4/tree/fc4f59e577feb1a4956671bc04ac18aaaf8cd842), the mathematical library for the Lean 4 theorem prover, extracted with [lean_scout](https://github.com/mathlib-initiative/lean_scout).\n\nExtracted from the Mathlib commit with the following hash.\n```\nfc4f59e577feb1a4956671bc04ac18aaaf8cd842\n```\n\nThe dataset follows this schema:\n\n```yaml\nfields:\n- type:\n    datatype: string\n  nullable: true\n  name: module\n- type:\n    datatype: struct\n    children:\n    - type:\n        datatype: nat\n      nullable: false\n      name: line\n    - type:\n        datatype: nat\n      nullable: false\n      name: column\n  nullable: false\n  name: startPos\n- type:\n    datatype: struct\n    children:\n    - type:\n        datatype: nat\n      nullable: false\n      name: line\n    - type:\n        datatype: nat\n      nullable: false\n      name: column\n  nullable: false\n  name: endPos\n- type:\n    datatype: struct\n    children:\n    - type:\n        datatype: nat\n      nullable: false\n      name: line\n    - type:\n        datatype: nat\n      nullable: false\n      name: column\n  nullable: false\n  name: nextStartPos\n- type:\n    item:\n      datatype: struct\n      children:\n      - type:\n          datatype: string\n        nullable: false\n        name: pp\n      - type:\n          datatype: string\n        nullable: false\n        name: ppTerm\n      - type:\n          datatype: bool\n        nullable: false\n        name: assigned\n      - type:\n          item:\n            datatype: string\n          datatype: list\n        nullable: false\n        name: usedConstants\n      - type:\n          item:\n            datatype: string\n          datatype: list\n        nullable: false\n        name: usedFVars\n      - type:\n          item:\n            datatype: struct\n            children:\n            - type:\n                datatype: bool\n              nullable: false\n              name: new\n            - type:\n                datatype: nat\n              nullable: true\n              name: index\n            - type:\n                datatype: string\n              nullable: false\n              name: kind\n            - type:\n                datatype: string\n              nullable: false\n              name: pp\n            - type:\n                datatype: string\n              nullable: false\n              name: ppTerm\n          datatype: list\n        nullable: false\n        name: usedGoals\n    datatype: list\n  nullable: false\n  name: goals\n- type:\n    item:\n      datatype: string\n    datatype: list\n  nullable: false\n  name: goalsAfter\n- type:\n    datatype: string\n  nullable: false\n  name: ppTac\n- type:\n    datatype: string\n  nullable: false\n  name: elaborator\n- type:\n    datatype: string\n  nullable: false\n  name: kind\n```\n\n# Attribution\n\nThis dataset is derived from [Mathlib](https://github.com/leanprover-community/mathlib4), an open-source mathematical library developed by the [leanprover-community](https://leanprover-community.github.io/). If you use this dataset, please cite the [Mathlib paper](https://doi.org/10.1145/3372885.3373824) or the [Mathlib repository](https://github.com/leanprover-community/mathlib4).\n\nA full list of Mathlib contributors is available at: https://github.com/leanprover-community/mathlib4/graphs/contributors\n","encoding":"utf8","key":"README.md","name":"README.md","size":3522,"truncated":false},{"bytes":"{\n  \"datasetName\": \"tactics-v4.36.0\",\n  \"datasetVersion\": 1,\n  \"files\": [\n    {\n      \"relativePath\": \"README.md\",\n      \"sizeBytes\": 3522\n    },\n    {\n      \"relativePath\": \"part-000.parquet\",\n      \"sizeBytes\": 2244442\n    },\n    {\n      \"relativePath\": \"part-001.parquet\",\n      \"sizeBytes\": 1984367\n    },\n    {\n      \"relativePath\": \"part-002.parquet\",\n      \"sizeBytes\": 2475379\n    },\n    {\n      \"relativePath\": \"part-003.parquet\",\n      \"sizeBytes\": 1912625\n    },\n    {\n      \"relativePath\": \"part-004.parquet\",\n      \"sizeBytes\": 1898246\n    },\n    {\n      \"relativePath\": \"part-005.parquet\",\n      \"sizeBytes\": 2126789\n    },\n    {\n      \"relativePath\": \"part-006.parquet\",\n      \"sizeBytes\": 2172523\n    },\n    {\n      \"relativePath\": \"part-007.parquet\",\n      \"sizeBytes\": 2063334\n    },\n    {\n      \"relativePath\": \"part-008.parquet\",\n      \"sizeBytes\": 2054528\n    },\n    {\n      \"relativePath\": \"part-009.parquet\",\n      \"sizeBytes\": 1909473\n    },\n    {\n      \"relativePath\": \"part-010.parquet\",\n      \"sizeBytes\": 2059293\n    },\n    {\n      \"relativePath\": \"part-011.parquet\",\n      \"sizeBytes\": 2168163\n    },\n    {\n      \"relativePath\": \"part-012.parquet\",\n      \"sizeBytes\": 2093723\n    },\n    {\n      \"relativePath\": \"part-013.parquet\",\n      \"sizeBytes\": 2060504\n    },\n    {\n      \"relativePath\": \"part-014.parquet\",\n      \"sizeBytes\": 3024990\n    },\n    {\n      \"relativePath\": \"part-015.parquet\",\n      \"sizeBytes\": 2016694\n    },\n    {\n      \"relativePath\": \"part-016.parquet\",\n      \"sizeBytes\": 2362653\n    },\n    {\n      \"relativePath\": \"part-017.parquet\",\n      \"sizeBytes\": 1986632\n    },\n    {\n      \"relativePath\": \"part-018.parquet\",\n      \"sizeBytes\": 2008128\n    },\n    {\n      \"relativePath\": \"part-019.parquet\",\n      \"sizeBytes\": 2237990\n    },\n    {\n      \"relativePath\": \"part-020.parquet\",\n      \"sizeBytes\": 1991090\n    },\n    {\n      \"relativePath\": \"part-021.parquet\",\n      \"sizeBytes\": 2449845\n    },\n    {\n      \"relativePath\": \"part-022.parquet\",\n      \"sizeBytes\": 2498544\n    },\n    {\n      \"relativePath\": \"part-023.parquet\",\n      \"sizeBytes\": 2300286\n    },\n    {\n      \"relativePath\": \"part-024.parquet\",\n      \"sizeBytes\": 2089105\n    },\n    {\n      \"relativePath\": \"part-025.parquet\",\n      \"sizeBytes\": 5634730\n    },\n    {\n      \"relativePath\": \"part-026.parquet\",\n      \"sizeBytes\": 2097963\n    },\n    {\n      \"relativePath\": \"part-027.parquet\",\n      \"sizeBytes\": 2012134\n    },\n    {\n      \"relativePath\": \"part-028.parquet\",\n      \"sizeBytes\": 2728079\n    },\n    {\n      \"relativePath\": \"part-029.parquet\",\n      \"sizeBytes\": 2594475\n    },\n    {\n      \"relativePath\": \"part-030.parquet\",\n      \"sizeBytes\": 2007392\n    },\n    {\n      \"relativePath\": \"part-031.parquet\",\n      \"sizeBytes\": 2351904\n    },\n    {\n      \"relativePath\": \"part-032.parquet\",\n      \"sizeBytes\": 2105091\n    },\n    {\n      \"relativePath\": \"part-033.parquet\",\n      \"sizeBytes\": 2399235\n    },\n    {\n      \"relativePath\": \"part-034.parquet\",\n      \"sizeBytes\": 1982838\n    },\n    {\n      \"relativePath\": \"part-035.parquet\",\n      \"sizeBytes\": 2168485\n    },\n    {\n      \"relativePath\": \"part-036.parquet\",\n      \"sizeBytes\": 1961683\n    },\n    {\n      \"relativePath\": \"part-037.parquet\",\n      \"sizeBytes\": 2262708\n    },\n    {\n      \"relativePath\": \"part-038.parquet\",\n      \"sizeBytes\": 2088744\n    },\n    {\n      \"relativePath\": \"part-039.parquet\",\n      \"sizeBytes\": 2028177\n    },\n    {\n      \"relativePath\": \"part-040.parquet\",\n      \"sizeBytes\": 2339661\n    },\n    {\n      \"relativePath\": \"part-041.parquet\",\n      \"sizeBytes\": 2110543\n    },\n    {\n      \"relativePath\": \"part-042.parquet\",\n      \"sizeBytes\": 1971719\n    },\n    {\n      \"relativePath\": \"part-043.parquet\",\n      \"sizeBytes\": 2298944\n    },\n    {\n      \"relativePath\": \"part-044.parquet\",\n      \"sizeBytes\": 2300515\n    },\n    {\n      \"relativePath\": \"part-045.parquet\",\n      \"sizeBytes\": 2026142\n    },\n    {\n      \"relativePath\": \"part-046.parquet\",\n      \"sizeBytes\": 2170374\n    },\n    {\n      \"relativePath\": \"part-047.parquet\",\n      \"sizeBytes\": 2266664\n    },\n    {\n      \"r","encoding":"utf8","key":"manifest.json","name":"manifest.json","size":28060,"truncated":true}],"sourceObjectKey":"part-000.parquet","starterCell":"from datasets import load_dataset\nds = load_dataset(\"mathlib-initiative/mathlib-tactics\")\nprint(ds)","starterSamplePath":"part-000.parquet","totalObjects":259},"summary":"Every tactic invocation in Mathlib, the community library of formalized mathematics for the Lean 4 interactive theorem prover, paired with the proof goals before and after the…","title":"Mathlib Tactics: Lean 4 Proof Steps with Goal States from the Mathlib Library (Mathlib Initiative)","updatedAt":"2026-11-22T00:49:37.710Z","visibility":"public","websiteUrl":"https://github.com/mathlib-initiative/lean_scout"}}