Lean 4 Build & Debug
Build the ComputationalPaths Lean 4 project using Lake.
Essential Commands
# Build entire project
lake build
# Build specific module
lake build ComputationalPaths.Path.CompPath.CircleCompPath
# Clean and rebuild
lake clean && lake build
# Run executable
lake exe computational_paths
Common Build Errors
| Error | Solution |
|---|---|
unknown identifier |
Check imports, use fully qualified name |
type mismatch |
Add type annotations or use @ for explicit args |
must be marked as 'noncomputable' |
Add noncomputable keyword |
universe level mismatch |
Ensure consistent universe variables (typically Type u) |
Debugging
#check myTerm -- show type
#print axioms myTheorem -- show axioms used
#reduce myTerm -- fully normalize
Toolchain
- Current:
leanprover/lean4:v4.24.0(seelean-toolchain) - Update: edit
lean-toolchain, thenlake clean && lake build
Converted and distributed by TomeVault — claim your Tome and manage your conversions.