A rudimentary export format, adapted from https://github.com/leanprover-community/lean/blob/master/doc/export_format.md with support for lean 4 kernel primitives.
- name: Lean.Name → Lean.Export.Entry
- level: Lean.Level → Lean.Export.Entry
- expr: Lean.Expr → Lean.Export.Entry
- defn: Lean.Name → Lean.Export.Entry
Instances For
Equations
- Lean.Export.instInhabitedEntry = { default := Lean.Export.Entry.name default }
Equations
- Lean.Export.instCoeNameEntry = { coe := Lean.Export.Entry.name }
Equations
Equations
- Lean.Export.instCoeExprEntry = { coe := Lean.Export.Entry.expr }
- map : Lean.HashMap α Nat
- next : Nat
Instances For
instance
Lean.Export.instInhabitedAlloc :
{a : Type u_1} → {a_1 : BEq a} → {a_2 : Hashable a} → Inhabited (Lean.Export.Alloc a)
Equations
- Lean.Export.instInhabitedAlloc = { default := { map := default, next := default } }
- names : Lean.Export.Alloc Lean.Name
- levels : Lean.Export.Alloc Lean.Level
- exprs : Lean.Export.Alloc Lean.Expr
- defs : Lean.HashSet Lean.Name
- stk : Array (Bool × Lean.Export.Entry)
Instances For
Equations
- Lean.Export.instInhabitedState = { default := { names := default, levels := default, exprs := default, defs := default, stk := default } }
- get : Lean.Export.State → Lean.Export.Alloc α
- modify : (Lean.Export.Alloc α → Lean.Export.Alloc α) → Lean.Export.State → Lean.Export.State
Instances
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
@[reducible, inline]
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Export.exportName Lean.Name.anonymous = do let __do_lift ← get match __do_lift.names.map.find? Lean.Name.anonymous with | some i => pure i | none => pure 0
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Export.exportLevel Lean.Level.zero = do let __do_lift ← get match __do_lift.levels.map.find? Lean.Level.zero with | some i => pure i | none => pure 0
Instances For
Equations
- Lean.Export.biStr x = match x with | Lean.BinderInfo.default => "#BD" | Lean.BinderInfo.implicit => "#BI" | Lean.BinderInfo.strictImplicit => "#BS" | Lean.BinderInfo.instImplicit => "#BC"
Instances For
Equations
- Lean.Export.exportDef.insert n = modify fun (s : Lean.Export.State) => { names := s.names, levels := s.levels, exprs := s.exprs, defs := s.defs.insert n, stk := s.stk }
Instances For
Equations
- Lean.Export.runExportM m = StateT.run' m default