Wolfram Language
Paclet Repository
Community-contributed installable additions to the Wolfram Language
Primary Navigation
Categories
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
Create a Paclet
Get Started
Download Definition Notebook
Learn More about
Wolfram Language
LeanLink
Guides
Lean 4 from the Wolfram Language
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
Lean 4 from the Wolfram Language
W
o
l
f
r
a
m
`
L
e
a
n
L
i
n
k
`
embeds the
L
e
a
n
4
theorem prover in the Wolfram Language through a native
L
i
b
r
a
r
y
L
i
n
k
shim.
L
e
a
n
I
m
p
o
r
t
and
L
e
a
n
I
m
p
o
r
t
S
t
r
i
n
g
load constants from a compiled module (Mathlib included) or a source string into a
L
e
a
n
E
n
v
i
r
o
n
m
e
n
t
of
L
e
a
n
T
e
r
m
values; each term carries its type and proof as symbolic expression trees built from the CIC heads (
L
e
a
n
C
o
n
s
t
,
L
e
a
n
A
p
p
,
L
e
a
n
F
o
r
a
l
l
,
…
), pretty-prints as Lean source, and draws as a
G
r
a
p
h
.
L
e
a
n
S
t
a
t
e
and
L
e
a
n
T
a
c
t
i
c
run interactive tactic proofs,
P
r
o
o
f
T
o
L
e
a
n
transpiles a Wolfram
P
r
o
o
f
O
b
j
e
c
t
into checkable Lean, and
L
e
a
n
C
o
m
p
i
l
e
lowers a Lean definition to a
F
u
n
c
t
i
o
n
C
o
m
p
i
l
e
function.
Importing and exporting
L
e
a
n
I
m
p
o
r
t
import constants from a compiled Lean module, returning a
L
e
a
n
E
n
v
i
r
o
n
m
e
n
t
L
e
a
n
I
m
p
o
r
t
S
t
r
i
n
g
compile a Lean 4 source string into a
L
e
a
n
E
n
v
i
r
o
n
m
e
n
t
L
e
a
n
E
x
p
o
r
t
S
t
r
i
n
g
convert a
L
e
a
n
E
n
v
i
r
o
n
m
e
n
t
back to Lean 4 source
L
e
a
n
E
x
p
o
r
t
write a
L
e
a
n
E
n
v
i
r
o
n
m
e
n
t
to a
.
l
e
a
n
file
Environments and terms
L
e
a
n
E
n
v
i
r
o
n
m
e
n
t
a collection of named Lean constants; supports
K
e
y
s
,
L
e
n
g
t
h
,
I
n
f
o
r
m
a
t
i
o
n
L
e
a
n
T
e
r
m
one Lean constant, with
"
T
y
p
e
"
,
"
T
e
r
m
"
,
"
T
y
p
e
F
o
r
m
"
,
"
P
a
r
a
m
e
t
e
r
s
"
,
"
E
x
p
r
G
r
a
p
h
"
properties
L
e
a
n
C
o
n
s
t
a
n
t
the raw
n
a
m
e
/
k
i
n
d
/
t
y
p
e
/
t
e
r
m
record returned by the native shim
Querying a loaded environment
L
e
a
n
E
x
p
r
the type of a constant as a symbolic expression tree
L
e
a
n
V
a
l
u
e
the proof or definition body of a constant
L
e
a
n
C
o
n
s
t
a
n
t
I
n
f
o
full constant info as a
L
e
a
n
C
o
n
s
t
a
n
t
L
e
a
n
L
i
s
t
C
o
n
s
t
a
n
t
s
every constant in a module as an
A
s
s
o
c
i
a
t
i
o
n
L
e
a
n
L
o
a
d
E
n
v
i
r
o
n
m
e
n
t
load a Lean environment handle for repeated queries
L
e
a
n
F
r
e
e
E
n
v
i
r
o
n
m
e
n
t
release a loaded environment handle
Expression heads (CIC)
L
e
a
n
C
o
n
s
t
a reference to a declared constant at given universe levels
L
e
a
n
A
p
p
function application
L
e
a
n
F
o
r
a
l
l
a
∀
/ dependent function (arrow) type
L
e
a
n
L
a
m
a
λ
-abstraction
L
e
a
n
L
e
t
a
l
e
t
-binding
L
e
a
n
B
V
a
r
a bound variable by de Bruijn index
L
e
a
n
F
V
a
r
a free variable (local hypothesis or parameter)
L
e
a
n
M
V
a
r
a metavariable (unresolved placeholder)
L
e
a
n
S
o
r
t
a universe (
P
r
o
p
,
T
y
p
e
,
…
)
L
e
a
n
L
i
t
N
a
t
a natural-number literal
L
e
a
n
L
i
t
S
t
r
a string literal
L
e
a
n
P
r
o
j
a structure-field projection
L
e
a
n
N
o
V
a
l
u
e
marks a constant with no body (axiom, opaque)
L
e
a
n
T
r
u
n
c
a
t
e
d
marks an expression cut off at the depth limit
Universe levels
L
e
a
n
L
e
v
e
l
Z
e
r
o
level 0, the universe of
P
r
o
p
L
e
a
n
L
e
v
e
l
S
u
c
c
the successor of a level
L
e
a
n
L
e
v
e
l
M
a
x
the maximum of two levels
L
e
a
n
L
e
v
e
l
I
M
a
x
the impredicative max (collapses to 0)
L
e
a
n
L
e
v
e
l
P
a
r
a
m
a named universe parameter (
u
,
v
)
L
e
a
n
L
e
v
e
l
M
V
a
r
a universe metavariable
Interactive proofs
L
e
a
n
S
t
a
t
e
open a theorem as a proof goal; holds
"
G
o
a
l
s
"
,
"
C
o
m
p
l
e
t
e
"
,
"
G
o
a
l
C
o
u
n
t
"
L
e
a
n
T
a
c
t
i
c
a tactic, applied as
L
e
a
n
T
a
c
t
i
c
[
t
a
c
]
[
s
t
a
t
e
]
L
e
a
n
G
o
a
l
a single goal, with
"
T
a
r
g
e
t
"
and
"
C
o
n
t
e
x
t
"
Transpiling Wolfram proofs
P
r
o
o
f
T
o
L
e
a
n
transpile a Wolfram
P
r
o
o
f
O
b
j
e
c
t
into a checkable
L
e
a
n
E
n
v
i
r
o
n
m
e
n
t
Compiling Lean to native code
L
e
a
n
T
o
F
u
n
c
t
i
o
n
convert a
L
e
a
n
T
e
r
m
into a
F
u
n
c
t
i
o
n
with
T
y
p
e
d
arguments
L
e
a
n
C
o
m
p
i
l
e
compile a
L
e
a
n
T
e
r
m
(or whole environment) via
F
u
n
c
t
i
o
n
C
o
m
p
i
l
e
L
e
a
n
C
o
m
p
i
l
e
T
y
p
e
d
compile and annotate the result with its dependent type
L
e
a
n
E
x
p
r
T
o
T
y
p
e
translate a Lean type expression into a compiler type object
Out-of-process project queries
L
e
a
n
E
x
p
r
G
r
a
p
h
expression graph for a constant, computed by a Lean subprocess
L
e
a
n
C
a
l
l
G
r
a
p
h
call / dependency graph for a constant, via subprocess
L
e
a
n
L
i
s
t
T
h
e
o
r
e
m
s
list a project's theorems via subprocess
I
m
p
o
r
t
D
O
T
import a DOT digraph file as a styled
G
r
a
p
h
▪
L
e
a
n
4
(
l
e
a
n
-
l
a
n
g
.
o
r
g
)
▪
M
a
t
h
l
i
b
4
(
G
i
t
H
u
b
)
"
"