HyperCactus0 commited on
Commit
20b68b4
·
verified ·
1 Parent(s): 7166588

Publish compact transition schema v3

Browse files
Files changed (2) hide show
  1. README.md +11 -14
  2. schema.json +23 -32
README.md CHANGED
@@ -69,8 +69,7 @@ provenance needed to trace a row back to its source theorem and environment.
69
  Rows are written as Parquet shards. Before publication, every shard is checked
70
  against its source rows; uploaded bytes are read back and verified at an immutable
71
  Hugging Face revision. Batch manifests record shard hashes, source-batch identity,
72
- and extraction evidence. A `replay_status` value records whether an additional
73
- replay check was performed; publication alone does not mean replay certification.
74
 
75
  ## Evaluation contamination and quarantine
76
 
@@ -90,11 +89,10 @@ cross between clean splits.
90
 
91
  ## Format
92
 
93
- Zstandard-compressed Parquet shards, one row per transition, schema version 2.
94
- The physical encoding is `leangpt-parquet-v2`: all 40 columns are retained.
95
- `schema_version` and `step_index` are int64; `terminal` is boolean;
96
- `imports`, `atomic_tactics`, `used_premises`, and `available_context` are lists of
97
- strings. Other columns are nullable strings.
98
 
99
  The following recursive/object columns contain lossless JSON text (parse with
100
  `json.loads` when non-null): `provenance`, `source_start`, `source_end`,
@@ -113,17 +111,16 @@ Each row is a single ordered step within a proof. The fields fall into these gro
113
 
114
  | Fields | Meaning |
115
  |---|---|
116
- | `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. |
117
- | `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. |
118
- | `theorem_name`, `theorem_statement_raw`, `theorem_source_raw`, `namespace`, `imports` | The theorem and its surrounding Lean source context. |
119
  | `state_before_raw`, `tactic_raw`, `state_after_raw` | The familiar human-readable goal display and tactic text for the transition. |
120
  | `state_before_structured`, `state_after_structured` | Parsed versions of the displayed proof states. |
121
  | `state_before_internal`, `state_after_internal` | Lean's detailed elaborator state: active goals, local declarations, targets, metavariables, universe metavariables, and recursive expressions. |
122
- | `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. |
123
- | `used_premises`, `available_context`, `source_start`, `source_end` | Referenced declarations, candidate context, and the tactic's source span. |
124
- | `terminal`, `terminal_marker`, `terminal_raw` | Whether this step closes the proof and the source/display marker associated with closure. |
125
  | `theorem_fingerprint`, `state_fingerprint`, `transition_fingerprint` | Deterministic hashes useful for deduplication, grouping, and integrity checks. |
126
- | `replay_status`, `replay_error` | Result of optional replay validation; `not_run` means no independent replay was attempted. |
127
 
128
  The recursive structures are stored as lossless JSON strings in Parquet. Parse them
129
  with `json.loads` when you need their tree structure; leave them as strings for
 
69
  Rows are written as Parquet shards. Before publication, every shard is checked
70
  against its source rows; uploaded bytes are read back and verified at an immutable
71
  Hugging Face revision. Batch manifests record shard hashes, source-batch identity,
72
+ and extraction evidence.
 
73
 
74
  ## Evaluation contamination and quarantine
75
 
 
89
 
90
  ## Format
91
 
92
+ Zstandard-compressed Parquet shards, one row per transition. The physical encoding
93
+ is `leangpt-parquet-v3` with 31 columns. `step_index` is int64; `terminal` is
94
+ boolean; `imports` and `available_context` are lists of strings. Other columns are
95
+ nullable strings.
 
96
 
97
  The following recursive/object columns contain lossless JSON text (parse with
98
  `json.loads` when non-null): `provenance`, `source_start`, `source_end`,
 
111
 
112
  | Fields | Meaning |
113
  |---|---|
114
+ | `example_id`, `proof_id`, `step_index`, `split` | Stable identity, position in the proof, and dataset split. `example_id` is globally unique; `proof_id` alone may not be. |
115
+ | `source_dataset`, `source_url`, `repo_commit`, `file_path`, `lean_version`, `mathlib_version`, `extractor_version`, `provenance` | Where the theorem came from and the environment and extraction provenance needed to reproduce or audit it. |
116
+ | `theorem_name`, `theorem_statement_raw`, `theorem_source_raw`, `imports` | The theorem and its surrounding Lean source context. |
117
  | `state_before_raw`, `tactic_raw`, `state_after_raw` | The familiar human-readable goal display and tactic text for the transition. |
118
  | `state_before_structured`, `state_after_structured` | Parsed versions of the displayed proof states. |
119
  | `state_before_internal`, `state_after_internal` | Lean's detailed elaborator state: active goals, local declarations, targets, metavariables, universe metavariables, and recursive expressions. |
120
+ | `tactic_internal` | The tactic's full Lean `Syntax` representation, including atomic and nested tactic structure, identifier resolution, and premise references when available. |
121
+ | `available_context`, `source_start`, `source_end` | Candidate context and the tactic's source span. |
122
+ | `terminal` | Whether this step closes the proof. |
123
  | `theorem_fingerprint`, `state_fingerprint`, `transition_fingerprint` | Deterministic hashes useful for deduplication, grouping, and integrity checks. |
 
124
 
125
  The recursive structures are stored as lossless JSON strings in Parquet. Parse them
126
  with `json.loads` when you need their tree structure; leave them as strings for
schema.json CHANGED
@@ -1,47 +1,38 @@
1
  {
2
- "encoding": "leangpt-parquet-v2",
3
  "columns": {
4
- "schema_version": "int64",
5
  "example_id": "string",
6
- "source_dataset": "string",
7
- "source_url": "string",
8
- "repo_commit": "string",
9
  "file_path": "string",
 
10
  "lean_version": "string",
11
  "mathlib_version": "string",
12
- "extractor_version": "string",
13
- "pantograph_version": "string",
14
- "theorem_name": "string",
15
- "theorem_statement_raw": "string",
16
- "theorem_source_raw": "string",
17
- "namespace": "string",
18
- "imports": "list<item: string>",
19
  "proof_id": "string",
20
- "step_index": "int64",
 
 
 
 
 
 
 
 
 
 
21
  "state_before_raw": "string",
22
  "state_before_structured": "string",
23
- "state_before_internal": "string",
24
- "tactic_raw": "string",
25
- "atomic_tactics": "list<item: string>",
26
  "tactic_internal": "string",
27
- "state_after_raw": "string",
28
- "state_after_structured": "string",
29
- "state_after_internal": "string",
30
  "terminal": "bool",
31
- "terminal_marker": "string",
32
- "terminal_raw": "string",
33
- "used_premises": "list<item: string>",
34
- "available_context": "list<item: string>",
35
- "source_start": "string",
36
- "source_end": "string",
37
  "theorem_fingerprint": "string",
38
- "state_fingerprint": "string",
39
- "transition_fingerprint": "string",
40
- "provenance": "string",
41
- "replay_status": "string",
42
- "replay_error": "string",
43
- "split": "string"
44
  },
 
45
  "json_columns": [
46
  "provenance",
47
  "source_end",
@@ -52,4 +43,4 @@
52
  "state_before_structured",
53
  "tactic_internal"
54
  ]
55
- }
 
1
  {
 
2
  "columns": {
3
+ "available_context": "list<item: string>",
4
  "example_id": "string",
5
+ "extractor_version": "string",
 
 
6
  "file_path": "string",
7
+ "imports": "list<item: string>",
8
  "lean_version": "string",
9
  "mathlib_version": "string",
 
 
 
 
 
 
 
10
  "proof_id": "string",
11
+ "provenance": "string",
12
+ "repo_commit": "string",
13
+ "source_dataset": "string",
14
+ "source_end": "string",
15
+ "source_start": "string",
16
+ "source_url": "string",
17
+ "split": "string",
18
+ "state_after_internal": "string",
19
+ "state_after_raw": "string",
20
+ "state_after_structured": "string",
21
+ "state_before_internal": "string",
22
  "state_before_raw": "string",
23
  "state_before_structured": "string",
24
+ "state_fingerprint": "string",
25
+ "step_index": "int64",
 
26
  "tactic_internal": "string",
27
+ "tactic_raw": "string",
 
 
28
  "terminal": "bool",
 
 
 
 
 
 
29
  "theorem_fingerprint": "string",
30
+ "theorem_name": "string",
31
+ "theorem_source_raw": "string",
32
+ "theorem_statement_raw": "string",
33
+ "transition_fingerprint": "string"
 
 
34
  },
35
+ "encoding": "leangpt-parquet-v3",
36
  "json_columns": [
37
  "provenance",
38
  "source_end",
 
43
  "state_before_structured",
44
  "tactic_internal"
45
  ]
46
+ }