Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    CastError
Message:      Couldn't cast
mathlib_commit: string
lean: string
bits: struct<0: string, 1: string, 2: string, 3: string, 4: string, 5: string, 6: string, 7: string>
  child 0, 0: string
  child 1, 1: string
  child 2, 2: string
  child 3, 3: string
  child 4, 4: string
  child 5, 5: string
  child 6, 6: string
  child 7, 7: string
boilerplate_mask: int64
nodes: int64
lean_constants_not_in_store: int64
counts: struct<instance: int64, projection: int64, coe: int64, coe_decl: int64, class: int64, structure: int (... 62 chars omitted)
  child 0, instance: int64
  child 1, projection: int64
  child 2, coe: int64
  child 3, coe_decl: int64
  child 4, class: int64
  child 5, structure: int64
  child 6, structure_ctor: int64
  child 7, boilerplate: int64
  child 8, unknown: int64
order: string
nodes_seen_in_lean: int64
edges: int64
to
{'mathlib_commit': Value('string'), 'lean': Value('string'), 'bits': {'0': Value('string'), '1': Value('string'), '2': Value('string'), '7': Value('string')}, 'order': Value('string'), 'nodes': Value('int64'), 'edges': Value('int64'), 'lean_constants_not_in_store': Value('int64'), 'nodes_seen_in_lean': Value('int64'), 'counts': {'store_edges': Value('int64'), 'type_only': Value('int64'), 'value_only': Value('int64'), 'type_and_value': Value('int64'), 'value_edges_of_definitions': Value('int64'), 'in_store_not_in_lean': Value('int64'), 'in_lean_not_in_store': Value('int64'), 'lean_edges_excluding_self': Value('int64'), 'lean_self_edges_dropped': Value('int64'), 'lean_names_not_in_store': Value('int64'), 'store_agreement_pct': Value('float64'), 'lean_agreement_pct': Value('float64')}}
because column names don't match
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 149, in get_rows_or_raise
                  return get_rows(
                      dataset=dataset,
                  ...<4 lines>...
                      column_names=column_names,
                  )
                File "/src/libs/libcommon/src/libcommon/utils.py", line 274, in decorator
                  return func(*args, **kwargs)
                File "/src/services/worker/src/worker/utils.py", line 129, in get_rows
                  rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
                File "/src/services/worker/src/worker/utils.py", line 544, in safe_iter
                  yield from ds.decode(False) if ds.features else ds
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 3074, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2578, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2603, in _iter_arrow
                  for key, pa_table in self.ex_iterable._iter_arrow():
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 577, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 459, in _iter_arrow
                  for key, pa_table in self.generate_tables_fn(**gen_kwags):
                                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 373, in _generate_tables
                  self._cast_table(pa_table, json_field_paths=json_field_paths),
                  ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
                  pa_table = table_cast(pa_table, self.info.features.arrow_schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2394, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2322, in cast_table_to_schema
                  raise CastError(
                  ...<3 lines>...
                  )
              datasets.table.CastError: Couldn't cast
              mathlib_commit: string
              lean: string
              bits: struct<0: string, 1: string, 2: string, 3: string, 4: string, 5: string, 6: string, 7: string>
                child 0, 0: string
                child 1, 1: string
                child 2, 2: string
                child 3, 3: string
                child 4, 4: string
                child 5, 5: string
                child 6, 6: string
                child 7, 7: string
              boilerplate_mask: int64
              nodes: int64
              lean_constants_not_in_store: int64
              counts: struct<instance: int64, projection: int64, coe: int64, coe_decl: int64, class: int64, structure: int (... 62 chars omitted)
                child 0, instance: int64
                child 1, projection: int64
                child 2, coe: int64
                child 3, coe_decl: int64
                child 4, class: int64
                child 5, structure: int64
                child 6, structure_ctor: int64
                child 7, boilerplate: int64
                child 8, unknown: int64
              order: string
              nodes_seen_in_lean: int64
              edges: int64
              to
              {'mathlib_commit': Value('string'), 'lean': Value('string'), 'bits': {'0': Value('string'), '1': Value('string'), '2': Value('string'), '7': Value('string')}, 'order': Value('string'), 'nodes': Value('int64'), 'edges': Value('int64'), 'lean_constants_not_in_store': Value('int64'), 'nodes_seen_in_lean': Value('int64'), 'counts': {'store_edges': Value('int64'), 'type_only': Value('int64'), 'value_only': Value('int64'), 'type_and_value': Value('int64'), 'value_edges_of_definitions': Value('int64'), 'in_store_not_in_lean': Value('int64'), 'in_lean_not_in_store': Value('int64'), 'lean_edges_excluding_self': Value('int64'), 'lean_self_edges_dropped': Value('int64'), 'lean_names_not_in_store': Value('int64'), 'store_agreement_pct': Value('float64'), 'lean_agreement_pct': Value('float64')}}
              because column names don't match

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

Leanage store: Mathlib at TauCeti's pin, plus TauCeti

Static data for Leanage, the dependency explorer for Lean declarations. Everything here was extracted with Lean itself; nothing is generated by a language model.

One graph of 1,646,902 declarations and 73,645,570 reference edges: Mathlib (with the packages it imports, Lean core included) and the 824,006 declarations of TauCeti, which refer to Mathlib's.

File What it is
names.txt.gz, modules.txt.gz, node_module.u32.gz the declarations and the module defining each (a module starting with TauCeti. belongs to TauCeti)
degrees.vbyte.gz, targets.vbyte.gz the reference edges, delta-coded
edgetypes.u8.gz, edgetypes.json.gz for each edge, whether the target is used in the statement, the proof, or both
flags.u8.gz, flags.json.gz instance (global and scoped), projection, coercion, class and structure flags (unknown for TauCeti declarations)
tactics.u16.gz, tactics.json.gz per declaration, which tactics are written in its source (induction, cases, rcases, obtain, by_cases, by_contra, contrapose, exfalso, fin_cases, split_ifs, rintro); bit 15 = the declaration has source lines, so no bit means no tactic data, not no tactics
meta.json provenance and counts

Provenance

  • Mathlib commit 31ce06eaadf4a200c0e1407c5f10953cf606b8f8, Lean toolchain leanprover/lean4:v4.37.0-rc1: the commit TauCeti pinned at the time of extraction.
  • TauCeti commit 8794ab329bb60340fa690a2902cf995f0571721b.
  • Extracted by scripts/extract_env.lean (Mathlib) and scripts/extract_library_stream.lean (TauCeti) in dsleo/leanage, merged by scripts/ingest_env_tsv.py.
  • Checked against Lean's own #print axioms: on a random sample of Mathlib declarations all but a handful of inductive types agree (where they differ the store reports more axioms, not fewer), and all 88 sampled TauCeti declarations agree.
  • Tactics: Lean gives each declaration's line range (declRangeExt, read by extract_env.lean and extract_library_stream.lean into .ranges files), scripts/ingest_tactics_ranges.py scans those lines of the source. Covered: 937,679 of the nodes (those with source lines). Calibrated by scripts/calibrate_tactics_ranges.py against the mathlib-initiative/mathlib-tactics dataset (Mathlib commit fc4f59e) on 347,049 Mathlib declarations: precision and recall are 99.8% or better for the eleven labels above; match was left out (precision 86%).
  • The store graph is byte-identical to the first revision of this repository; this revision adds the tactic files, and flags scoped instances (541 declarations newly flagged).
  • 3,653 auto-generated lemmas that Lean realizes again in several modules were kept once.

Limits

  • Tactics are read from the source, not from Lean's elaborator: macro-generated tactics are missed and a few term-mode uses can be misread; compiler-generated declarations have no source lines.
  • Flags are unknown for TauCeti declarations.
  • Edges are references in Lean terms, not a proof certificate.
  • Pinned to the commits above; later Mathlib or TauCeti changes are not reflected.

Licensed Apache-2.0, as Mathlib and TauCeti.

Downloads last month
72