phanerozoic commited on
Commit
0a2161a
·
verified ·
1 Parent(s): c42e33d

Re-extract: full statement+proof, normalized schema, provenance

Browse files
Files changed (2) hide show
  1. README.md +142 -93
  2. data/train-00000-of-00001.parquet +2 -2
README.md CHANGED
@@ -1,93 +1,142 @@
1
- ---
2
- license: lgpl-2.1
3
- task_categories:
4
- - text-generation
5
- - feature-extraction
6
- language:
7
- - en
8
- tags:
9
- - theorem-proving
10
- - formal-methods
11
- - coq
12
- - standard-library
13
- size_categories:
14
- - 1K<n<10K
15
- dataset_info:
16
- features:
17
- - name: fact
18
- dtype: string
19
- - name: type
20
- dtype: string
21
- - name: library
22
- dtype: string
23
- - name: imports
24
- list: string
25
- - name: filename
26
- dtype: string
27
- - name: symbolic_name
28
- dtype: string
29
- - name: docstring
30
- dtype: string
31
- splits:
32
- - name: train
33
- num_bytes: 692381
34
- num_examples: 2364
35
- download_size: 151271
36
- dataset_size: 692381
37
- configs:
38
- - config_name: default
39
- data_files:
40
- - split: train
41
- path: data/train-*
42
- ---
43
-
44
- # Coq-Stdlib
45
-
46
- Structured dataset of definitions and theorems from the Coq standard library.
47
-
48
- ## Dataset Description
49
-
50
- - **Source:** [coq/coq/theories](https://github.com/coq/coq/tree/master/theories)
51
- - **Entries:** 2,364
52
- - **Files processed:** 106
53
- - **License:** LGPL-2.1 (matches Coq)
54
-
55
- ## Schema
56
-
57
- | Column | Type | Description |
58
- |--------|------|-------------|
59
- | fact | string | Declaration body (without type keyword) |
60
- | type | string | Definition, Lemma, Theorem, Fixpoint, Inductive, Class, Instance, Ltac, Ltac2, etc. |
61
- | library | string | Top-level module (Corelib, Ltac2) |
62
- | imports | list | Require/Import statements |
63
- | filename | string | Source file path |
64
- | symbolic_name | string | Declaration identifier |
65
-
66
- ## Statistics
67
-
68
- ### By Type
69
- | Type | Count |
70
- |------|-------|
71
- | Definition | 688 |
72
- | Lemma | 553 |
73
- | Ltac2 | 550 |
74
- | Ltac | 124 |
75
- | Fixpoint | 75 |
76
- | Axiom | 74 |
77
- | Theorem | 62 |
78
- | Class | 48 |
79
- | Inductive | 48 |
80
- | Instance | 45 |
81
-
82
- ## Use Cases
83
-
84
- - Retrieval/RAG for Coq
85
- - Learning Coq standard library patterns
86
- - Training embeddings for formal proofs
87
- - Documentation exploration
88
-
89
- ## Related Datasets
90
-
91
- - [Coq-HoTT](https://huggingface.co/datasets/phanerozoic/Coq-HoTT)
92
- - [Coq-UniMath](https://huggingface.co/datasets/phanerozoic/Coq-UniMath)
93
- - [Coq-MetaCoq](https://huggingface.co/datasets/phanerozoic/Coq-MetaCoq)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: lgpl-2.1
3
+ task_categories:
4
+ - text-generation
5
+ - feature-extraction
6
+ language:
7
+ - en
8
+ tags:
9
+ - theorem-proving
10
+ - formal-methods
11
+ - coq
12
+ - standard-library
13
+ size_categories:
14
+ - 1K<n<10K
15
+ dataset_info:
16
+ features:
17
+ - {name: fact, dtype: string}
18
+ - {name: statement, dtype: string}
19
+ - {name: proof, dtype: string}
20
+ - {name: type, dtype: string}
21
+ - {name: kind, dtype: string}
22
+ - {name: symbolic_name, dtype: string}
23
+ - {name: library, dtype: string}
24
+ - {name: filename, dtype: string}
25
+ - {name: imports, list: string}
26
+ - {name: deps, list: string}
27
+ - {name: docstring, dtype: string}
28
+ - {name: line_start, dtype: int64}
29
+ - {name: line_end, dtype: int64}
30
+ - {name: has_proof, dtype: bool}
31
+ - {name: source_url, dtype: string}
32
+ - {name: commit, dtype: string}
33
+ - {name: content_level, dtype: string}
34
+ splits:
35
+ - {name: train, num_examples: 19736}
36
+ config_name: default
37
+ configs:
38
+ - config_name: default
39
+ data_files:
40
+ - split: train
41
+ path: data/train-*
42
+ ---
43
+
44
+ # Coq-Stdlib
45
+
46
+ Structured dataset of definitions and theorems from the Coq standard library.
47
+
48
+ ## Source
49
+
50
+ - Repository: https://github.com/rocq-prover/stdlib
51
+ - Commit: `f76a666b0b2c28c671d4fdf6dd25bcab865b9c36`
52
+ - Files: 583
53
+ - License: lgpl-2.1
54
+
55
+ ## Schema
56
+
57
+ | Column | Type | Description |
58
+ |--------|------|-------------|
59
+ | fact | string | Verbatim declaration: statement followed by proof where present |
60
+ | statement | string | Verbatim statement (keyword through the closing period) |
61
+ | proof | string | Verbatim proof block (`Proof. ... Qed.`/`Defined.`), empty if none |
62
+ | type | string | Raw declaration keyword |
63
+ | kind | string | Normalized kind |
64
+ | symbolic_name | string | Declaration identifier |
65
+ | library | string | Sub-library |
66
+ | filename | string | Repository-relative source path |
67
+ | imports | list[string] | File-level `Require`/`Import` modules |
68
+ | deps | list[string] | Intra-corpus identifiers referenced |
69
+ | docstring | string | Preceding documentation comment, null if absent |
70
+ | line_start | int | First source line |
71
+ | line_end | int | Last source line |
72
+ | has_proof | bool | Whether a proof block was captured |
73
+ | source_url | string | Upstream repository |
74
+ | commit | string | Upstream commit extracted |
75
+ | content_level | string | `statement+proof` |
76
+
77
+ ## Statistics
78
+
79
+ - Entries: 19,736
80
+ - With proof: 12,612 (63.9%)
81
+ - With docstring: 3,080 (15.6%)
82
+ - Libraries: 44
83
+
84
+ ### By type
85
+
86
+ | Type | Count |
87
+ |---|---|
88
+ | Lemma | 10,586 |
89
+ | Definition | 2,880 |
90
+ | Notation | 1,716 |
91
+ | Theorem | 1,398 |
92
+ | Instance | 770 |
93
+ | Ltac | 662 |
94
+ | Fixpoint | 545 |
95
+ | Parameter | 364 |
96
+ | Inductive | 185 |
97
+ | Hypothesis | 133 |
98
+ | Axiom | 132 |
99
+ | Let | 116 |
100
+ | Record | 60 |
101
+ | Class | 45 |
102
+ | Example | 42 |
103
+ | Corollary | 24 |
104
+ | Fact | 17 |
105
+ | Coercion | 16 |
106
+ | Scheme | 15 |
107
+ | Remark | 11 |
108
+ | Parameters | 6 |
109
+ | CoFixpoint | 5 |
110
+ | Variant | 3 |
111
+ | CoInductive | 3 |
112
+ | Proposition | 1 |
113
+ | Structure | 1 |
114
+
115
+ ## Example
116
+
117
+ ```coq
118
+ #[local]
119
+ Lemma minus_plus_simpl_l_reverse_stt n m p : n - m = p + n - (p + m).
120
+ Proof.
121
+ now rewrite Nat.sub_add_distr, Nat.add_comm, Nat.add_sub.
122
+ Qed.
123
+ ```
124
+
125
+ - kind: lemma | symbolic_name: `minus_plus_simpl_l_reverse_stt` | theories/Arith/Arith_base.v:287
126
+
127
+ ## Use
128
+
129
+ Statement and proof are available both joined (`fact`) and split (`statement`, `proof`) for
130
+ proof-term modeling, autoformalization, retrieval, and dependency analysis via `deps`.
131
+
132
+ ## Citation
133
+
134
+ ```bibtex
135
+ @misc{coq_stdlib_dataset,
136
+ title = {Coq-Stdlib},
137
+ author = {Norton, Charles},
138
+ year = {2026},
139
+ note = {Extracted from https://github.com/rocq-prover/stdlib, commit f76a666b0b2c},
140
+ url = {https://huggingface.co/datasets/phanerozoic/Coq-Stdlib}
141
+ }
142
+ ```
data/train-00000-of-00001.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:18be0f068a417b0a7a28d8f7e40a4d1d1a62073375e1728e92c05bd6843fc8e6
3
- size 151271
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1514b55f6ab07fffed8dd12c56d00295321d28b38c54af274cb65f80a0b21f3b
3
+ size 4064974