Expand description
Read Lean 4 .olean files directly and emit the lean4export stream, as NDJSON or in a
compact binary form (blean), without starting Lean.
Re-exports§
Modules§
- blean
- blean, the binary export format.
- info
- Facts about each expression that kernels otherwise compute on import.
- ndjson
- The lean4export 3.1.0 NDJSON format.
- record
- One line of the export stream with every reference resolved to an output id. The
traversal in
crate::Exporterproduces these and every output format consumes them.
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.
- Ctor
- Decl
- A constant as the olean lists it, without its terms.
- Defn
- Env
- Every constant reachable from a set of root modules, in import order.
- Exporter
- Streams an
Envin lean4export 3.1.0 order to aSink, NDJSON by default. Ids are assigned on first use and every record only refers to records 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
Tin its table. - Import
- One entry of a module’s import list.
- Inductive
- Rec
- Rule
- Section
- A slice of the module’s data and the bytes only it reaches. Shared objects count toward the first section that reaches them, in the order constants, extra names, imports, then environment extensions.
- Summary
- What one module’s olean holds, read straight from its header and
ModuleDatawithout decoding any terms. - 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
- Quot
Kind
Constants§
Functions§
- resolve
- The
.oleanfor a dotted module name such asInit.Prelude, from the first directory ofsearchthat has it. - search_
path - with_
big_ stack - Run
fon a thread with a stack deep enough for long application spines and binder chains, re-raising its panic if it has one.Exporterrecurses over terms, so run it inside this.