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`
ImportDOT
​
ImportDOT
["file.dot"]
imports a DOT digraph file as a
Graph
, carrying over node colors, labels, and edge styles.
​
Details and Options
▪
ImportDOT
is the reader behind
LeanExprGraph
and
LeanCallGraph
: the Lean subprocess emits a DOT graph, and
ImportDOT
turns it into a styled
Graph
.
▪
It expects the Graphviz convention of quoted node and edge names, one statement per line:
"name"[label=...,fillcolor=...];
for nodes and
"src""tgt"[color=...];
for edges. Node
fillcolor
/
label
/
type
and edge
color
/
style
/
penwidth
/
label
attributes are honored.
▪
All
Graph
options pass through.
​
Examples  
(2)
Basic Examples  
(1)
Examples Initialization
Import a small DOT digraph:
In[1]:=
dotSource=StringRiffle[{​​"digraph G {",​​" \"add_comm\" [label=\"add_comm\", fillcolor=\"#3366cc\", type=\"theorem\"];",​​" \"Add\" [label=\"Add\", fillcolor=\"#cc6633\"];",​​" \"add_comm\" -> \"Add\";",​​"}"​​},""];​​dotFile=Export[FileNameJoin[{$TemporaryDirectory,"ll_demo.dot"}],dotSource,"Text"];​​
ImportDOT
[dotFile]
Out[1]=
Possible Issues  
(1)

SeeAlso
LeanExprGraph
 
▪
LeanCallGraph
RelatedGuides
▪
LeanLink
""

© 2026 Wolfram. All rights reserved.

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