Wolfram/LeanLink
Native link between Wolfram Language and Lean 4
Contributed By: Nik Murzin
The entry points are LeanImport and LeanImportString (load an environment) and LeanExport / LeanExportString (write Lean source back). LeanTerm and LeanEnvironment are the two computable wrappers; the Parse*-style CIC heads - LeanConst, LeanApp, LeanForall, LeanLam, LeanLet, LeanBVar, LeanFVar, LeanSort, LeanLitNat, LeanLitStr, LeanProj - build expressions, with universe levels LeanLevelZero, LeanLevelSucc, LeanLevelMax. LeanState, LeanTactic, and LeanGoal run interactive proofs; ProofToLean transpiles a ProofObject; LeanCompile, LeanToFunction compile to native code; LeanExprGraph, LeanCallGraph, LeanListTheorems query a project out of process.
Installation Instructions
To install this paclet in your Wolfram Language environment,
evaluate this code:
PacletInstall[ResourceObject["https://wolfr.am/1HXtzUnZG"]]
To load the code after installation, evaluate this code:
Needs["Wolfram`LeanLink`"]
Details
Paclet Guide
Examples
Disclosures
- Wolfram Language built-in symbols