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

  • 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
Wolfram`LeanLink`
ProofToLean
​
ProofToLean
[proof]
transpiles a Wolfram
ProofObject
into a
LeanEnvironment
whose constants are the axioms, lemmas, and final theorem of the proof, with structured Lean tactic bodies.
​
Details and Options
▪
proof is a
ProofObject
such as the result of
FindEquationalProof
. Each premise becomes an
axiom
, each derived step a
theorem
with a tactic proof, and the goal the
"FinalGoal"
theorem.
▪
Types are carried as
LeanTerm
expression trees; step proofs are emitted as Lean tactic blocks (
have
,
conv
,
simponly
,
exact
). The result therefore round-trips through
LeanExportString
into compilable Lean source.
▪
Because the transpiled environment is real Lean, you can re-check it - opening the
"FinalGoal"
with
LeanState
and confirming it auto-completes verifies the transpilation.
​
Examples  
(3)
Basic Examples  
(1)
Examples Initialization
Transpile an equational proof:
In[1]:=
proof=FindEquationalProof[ac,{ab,bc}];​​leanEnv=
ProofToLean
[proof]
Out[1]=
LeanEnvironment
Constants: 5
Kinds: 3 axiom2 theorem

The generated constants - premises, derived step, and goal:
In[2]:=
Keys[leanEnv]
Out[2]=
{Ax1,Ax2,Hyp1,SL1,FinalGoal}
The final goal's type:
In[3]:=
leanEnv["FinalGoal"]["TypeForm"]
Out[3]=
a = c
Scope  
(1)

Properties & Relations  
(1)

SeeAlso
LeanExportString
 
▪
LeanState
 
▪
LeanEnvironment
 
▪
LeanImportString
RelatedGuides
▪
LeanLink
""

© 2026 Wolfram. All rights reserved.

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