Coq-MathComp / README.md
phanerozoic's picture
Re-extract: full statement+proof, normalized schema, provenance
ba4d4b0 verified
|
Raw
History Blame
3.66 kB
metadata
license: other
license_name: cecill-b
license_link: https://cecill.info/licences/Licence_CeCILL-B_V1-en.html
task_categories:
  - text-generation
  - feature-extraction
language:
  - en
tags:
  - theorem-proving
  - formal-methods
  - coq
  - mathcomp
  - algebra
  - mathematics
size_categories:
  - 10K<n<100K
dataset_info:
  features:
    - name: fact
      dtype: string
    - name: statement
      dtype: string
    - name: proof
      dtype: string
    - name: type
      dtype: string
    - name: symbolic_name
      dtype: string
    - name: library
      dtype: string
    - name: filename
      dtype: string
    - name: imports
      list: string
    - name: deps
      list: string
    - name: docstring
      dtype: string
    - name: line_start
      dtype: int64
    - name: line_end
      dtype: int64
    - name: has_proof
      dtype: bool
    - name: source_url
      dtype: string
    - name: commit
      dtype: string
  splits:
    - name: train
      num_examples: 23813
  config_name: default
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*

Coq-MathComp

Structured dataset from the Mathematical Components library (MathComp) for Coq.

Source

Schema

Column Type Description
fact string Verbatim declaration with the leading keyword removed: signature and body/proof joined
statement string Signature with the leading keyword removed (verbatim slice)
proof string Verbatim proof/body, empty if none
type string Declaration keyword
symbolic_name string Declaration identifier
library string Sub-library
filename string Repository-relative source path
imports list[string] File-level Require/Import modules
deps list[string] Intra-corpus identifiers referenced
docstring string Preceding documentation comment, null if absent
line_start int First source line
line_end int Last source line
has_proof bool Whether a proof block was captured
source_url string Upstream repository
commit string Upstream commit extracted

Statistics

  • Entries: 23,813
  • With proof: 23,468 (98.6%)
  • With docstring: 847 (3.6%)
  • Libraries: 10

By type

Type Count
Lemma 15,224
Notation 3,122
Definition 2,907
Fact 737
Let 557
Canonical 407
Hypothesis 202
Fixpoint 149
Coercion 119
Variant 116
Theorem 63
Hypotheses 51
Inductive 38
Ltac 26
Structure 24
Record 23
Corollary 18
Example 7
Parameter 5
Proposition 5
Axiom 4
Instance 3
Remark 3
Class 2
Scheme 1

Example

floor_subproof n :
  if n \is real_num then n%:~R <= n < (n + 1)%:~R else n == 0.
Proof. by rewrite num_real !intz ltzD1 lexx. Qed.
  • type: Fact | symbolic_name: floor_subproof | algebra/archimedean.v:163

Use

Statement and proof are available both joined (fact) and split (statement, proof) for proof-term modeling, autoformalization, retrieval, and dependency analysis via deps.

Citation

@misc{coq_mathcomp_dataset,
  title  = {Coq-MathComp},
  author = {Norton, Charles},
  year   = {2026},
  note   = {Extracted from https://github.com/math-comp/math-comp, commit 91d97df9cf32},
  url    = {https://huggingface.co/datasets/phanerozoic/Coq-MathComp}
}