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
Tutorials
Checking Mathlib with TypeTheory
Exploring Mathlib with LeanLink
An Import Graph for Mathlib
Getting Started with LeanLink
Guides
Lean 4 from the Wolfram Language
Symbols
ImportDOT
LeanApp
LeanBuild
LeanBVar
LeanCallGraph
LeanCompile
LeanConstantInfo
LeanConstant
LeanConst
LeanEnvironment
LeanEvaluate
LeanExport
LeanExportString
LeanExprGraph
LeanExpr
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
LeanToTypeTheory
LeanTruncated
LeanValue
ProofToLean
TypeTheoryToLean
Wolfram`LeanLink`
L
e
a
n
L
o
a
d
E
n
v
i
r
o
n
m
e
n
t
L
e
a
n
L
o
a
d
E
n
v
i
r
o
n
m
e
n
t
[
{
"
M
o
d
u
l
e
1
"
,
.
.
.
}
,
s
e
a
r
c
h
P
a
t
h
]
l
o
a
d
s
a
L
e
a
n
e
n
v
i
r
o
n
m
e
n
t
f
r
o
m
t
h
e
g
i
v
e
n
m
o
d
u
l
e
s
a
n
d
r
e
t
u
r
n
s
a
n
i
n
t
e
g
e
r
h
a
n
d
l
e
f
o
r
r
e
p
e
a
t
e
d
l
o
w
-
l
e
v
e
l
q
u
e
r
i
e
s
.
D
e
t
a
i
l
s
a
n
d
O
p
t
i
o
n
s
▪
searchPath
lists every directory the modules' compiled
.
o
l
e
a
n
files come from, separated by
"
:
"
: the project's own build directory (for a lake project,
<
p
r
o
j
e
c
t
>
/
.
l
a
k
e
/
b
u
i
l
d
/
l
i
b
/
l
e
a
n
), each dependency's, and the Lean toolchain's
l
i
b
/
l
e
a
n
, which holds
I
n
i
t
.
L
e
a
n
I
m
p
o
r
t
assembles this path for you from
"
P
r
o
j
e
c
t
D
i
r
"
.
▪
The returned handle is a positive integer naming a native environment held open in the Lean runtime. A failed load returns
0
.
▪
Use the handle for many
L
e
a
n
C
o
n
s
t
a
n
t
I
n
f
o
/
L
e
a
n
E
x
p
r
style queries against one loaded environment without reloading it each time, then release it with
L
e
a
n
F
r
e
e
E
n
v
i
r
o
n
m
e
n
t
.
▪
Most workflows use
L
e
a
n
I
m
p
o
r
t
instead, which loads, queries, and wraps constants in one step.
L
e
a
n
L
o
a
d
E
n
v
i
r
o
n
m
e
n
t
is the lower-level door for repeated queries where holding the environment open matters.
Examples
(
2
)
Basic Examples
(
1
)
Load the core
I
n
i
t
module from the Lean toolchain into an environment handle, then free it:
I
n
[
1
]
:
=
t
o
o
l
c
h
a
i
n
L
i
b
=
F
i
l
e
N
a
m
e
J
o
i
n
[
{
$
H
o
m
e
D
i
r
e
c
t
o
r
y
,
"
.
e
l
a
n
"
,
"
t
o
o
l
c
h
a
i
n
s
"
,
"
l
e
a
n
p
r
o
v
e
r
-
-
l
e
a
n
4
-
-
-
v
4
.
3
5
.
0
"
,
"
l
i
b
"
,
"
l
e
a
n
"
}
]
;
I
f
D
i
r
e
c
t
o
r
y
Q
[
t
o
o
l
c
h
a
i
n
L
i
b
]
,
h
a
n
d
l
e
=
L
e
a
n
L
o
a
d
E
n
v
i
r
o
n
m
e
n
t
[
{
"
I
n
i
t
"
}
,
t
o
o
l
c
h
a
i
n
L
i
b
]
;
r
e
s
u
l
t
=
h
a
n
d
l
e
>
0
;
L
e
a
n
F
r
e
e
E
n
v
i
r
o
n
m
e
n
t
[
h
a
n
d
l
e
]
;
r
e
s
u
l
t
,
"
L
e
a
n
t
o
o
l
c
h
a
i
n
n
o
t
i
n
s
t
a
l
l
e
d
"
O
u
t
[
1
]
=
T
r
u
e
P
o
s
s
i
b
l
e
I
s
s
u
e
s
(
1
)
S
e
e
A
l
s
o
L
e
a
n
F
r
e
e
E
n
v
i
r
o
n
m
e
n
t
▪
L
e
a
n
I
m
p
o
r
t
▪
L
e
a
n
C
o
n
s
t
a
n
t
I
n
f
o
R
e
l
a
t
e
d
G
u
i
d
e
s
▪
L
e
a
n
4
f
r
o
m
t
h
e
W
o
l
f
r
a
m
L
a
n
g
u
a
g
e
"
"