Skip to main content

Crate olean_export

Crate olean_export 

Source
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§

pub use info::Info;
pub use record::Counts;
pub use record::Record;
pub use record::Sink;

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::Exporter produces 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 Env in lean4export 3.1.0 order to a Sink, 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 T in 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 ModuleData without 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
QuotKind

Constants§

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

Functions§

resolve
The .olean for a dotted module name such as Init.Prelude, from the first directory of search that has it.
search_path

Type Aliases§

ExprId
LevelId
NameId
Result