Skip to main content

Crate olean_export

Crate olean_export 

Source
Expand description

Read Lean 4 .olean files directly and emit the lean4export NDJSON stream, without starting Lean.

Structs§

Body
The value of a theorem or opaque constant.
Const
A declaration the kernel would accept. Unsafe and partial ones are dropped at load time.
Counts
Lines written so far for each table, which is also the next id each hands out.
Ctor
Defn
Env
Every constant reachable from a set of root modules, in import order.
Exporter
Streams an Env in the lean4export 3.1.0 NDJSON format. Ids are assigned on first use and every line only refers to lines already written.
Exprs
Expressions by id. Ids come in chunks, each filled by one decoding thread, with gaps.
Header
Fields of the fixed-size header that precedes every compacted region.
Id
The id of a T in its table.
Inductive
Rec
Rule
Table
A hash-consing arena: structurally equal nodes get the same id. Ids are interleaved across shards, so they are nearly but not exactly dense.

Enums§

Binder
Error
Everything that can go wrong loading oleans or writing an export.
Expr
Equality and hashing ignore binder names and annotations, matching Lean’s BEq Expr, so terms that differ only there share one id, as they do in lean4export.
Hints
Kind
Level
Name
QuotKind

Constants§

ANON
SUPPORTED
The Lean releases whose object layouts this reader has been checked against.
ZERO

Functions§

search_path
with_big_stack
Run f on a thread with a stack deep enough for long application spines and binder chains, re-raising its panic if it has one. Exporter recurses over terms, so run it inside this.

Type Aliases§

ExprId
LevelId
NameId
Result