Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

LeanLink

Guides

  • LeanLink

Tech Notes

  • Exploring Mathlib with LeanLink
  • An Import Graph for Mathlib
  • Getting Started with LeanLink

Symbols

  • ImportDOT
  • LeanApp
  • LeanBVar
  • LeanCallGraph
  • LeanCompile
  • LeanCompileTyped
  • LeanConstantInfo
  • LeanConstant
  • LeanConst
  • LeanEnvironment
  • LeanExport
  • LeanExportString
  • LeanExprGraph
  • LeanExpr
  • LeanExprToType
  • LeanForall
  • LeanFreeEnvironment
  • LeanFVar
  • LeanGoal
  • LeanImport
  • LeanImportString
  • LeanLam
  • LeanLet
  • LeanLevelIMax
  • LeanLevelMax
  • LeanLevelMVar
  • LeanLevelParam
  • LeanLevelSucc
  • LeanLevelZero
  • LeanListConstants
  • LeanListTheorems
  • LeanLitNat
  • LeanLitStr
  • LeanLoadEnvironment
  • LeanMVar
  • LeanNoValue
  • LeanProj
  • LeanSort
  • LeanState
  • LeanTactic
  • LeanTerm
  • LeanToFunction
  • LeanTruncated
  • LeanValue
  • ProofToLean
LeanLink
Wolfram`LeanLink`
embeds the
Lean 4
theorem prover in the Wolfram Language through a native
LibraryLink
shim.
LeanImport
and
LeanImportString
load constants from a compiled module (Mathlib included) or a source string into a
LeanEnvironment
of
LeanTerm
values; each term carries its type and proof as symbolic expression trees built from the CIC heads (
LeanConst
,
LeanApp
,
LeanForall
, …), pretty-prints as Lean source, and draws as a
Graph
.
LeanState
and
LeanTactic
run interactive tactic proofs,
ProofToLean
transpiles a Wolfram
ProofObject
into checkable Lean, and
LeanCompile
lowers a Lean definition to a
FunctionCompile
function.
LeanImport
import constants from a compiled Lean module, returning a
LeanEnvironment
LeanImportString
compile a Lean 4 source string into a
LeanEnvironment
LeanExportString
convert a
LeanEnvironment
back to Lean 4 source
LeanExport
write a
LeanEnvironment
to a
.lean
file
LeanEnvironment
a collection of named Lean constants; supports
Keys
,
Length
,
Information
LeanTerm
one Lean constant, with
"Type"
,
"Term"
,
"TypeForm"
,
"Parameters"
,
"ExprGraph"
properties
LeanConstant
the raw
name/kind/type/term
record returned by the native shim
LeanExpr
the type of a constant as a symbolic expression tree
LeanValue
the proof or definition body of a constant
LeanConstantInfo
full constant info as a
LeanConstant
LeanListConstants
every constant in a module as an
Association
LeanLoadEnvironment
load a Lean environment handle for repeated queries
LeanFreeEnvironment
release a loaded environment handle
LeanConst
a reference to a declared constant at given universe levels
LeanApp
function application
LeanForall
a
∀
/ dependent function (arrow) type
LeanLam
a
λ
-abstraction
LeanLet
a
let
-binding
LeanBVar
a bound variable by de Bruijn index
LeanFVar
a free variable (local hypothesis or parameter)
LeanMVar
a metavariable (unresolved placeholder)
LeanSort
a universe (
Prop
,
Type
, …)
LeanLitNat
a natural-number literal
LeanLitStr
a string literal
LeanProj
a structure-field projection
LeanNoValue
marks a constant with no body (axiom, opaque)
LeanTruncated
marks an expression cut off at the depth limit
LeanLevelZero
level 0, the universe of
Prop
LeanLevelSucc
the successor of a level
LeanLevelMax
the maximum of two levels
LeanLevelIMax
the impredicative max (collapses to 0)
LeanLevelParam
a named universe parameter (
u
,
v
)
LeanLevelMVar
a universe metavariable
LeanState
open a theorem as a proof goal; holds
"Goals"
,
"Complete"
,
"GoalCount"
LeanTactic
a tactic, applied as
LeanTactic[tac][state]
LeanGoal
a single goal, with
"Target"
and
"Context"
ProofToLean
transpile a Wolfram
ProofObject
into a checkable
LeanEnvironment
LeanToFunction
convert a
LeanTerm
into a
Function
with
Typed
arguments
LeanCompile
compile a
LeanTerm
(or whole environment) via
FunctionCompile
LeanCompileTyped
compile and annotate the result with its dependent type
LeanExprToType
translate a Lean type expression into a compiler type object
LeanExprGraph
expression graph for a constant, computed by a Lean subprocess
LeanCallGraph
call / dependency graph for a constant, via subprocess
LeanListTheorems
list a project's theorems via subprocess
ImportDOT
import a DOT digraph file as a styled
Graph
▪
Lean 4 (lean-lang.org)
▪
Mathlib4 (GitHub)
""

© 2026 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com