Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
We use the auxiliary procedure pull_nested_rec_fn to pull recursive application in nested match expressions. This is needed because the nested match expression is compiled before we process the recursive procedure that contains it. This transformation may produce performance problems if the recursive application does not depend on the data being matched. Here is an example from the new test: ``` def tst : tree → nat | (tree.leaf v) := v | (tree.node v l r) := match f v with | tt := tst l | ff := tst r end ``` pull_nested_rec_fn will convert it into ``` def tst : tree → nat | (tree.leaf v) := v | (tree.node v l r) := tst._match_1 (f v) (tst l) (tst r) ``` Since our interpreter uses eager evaluation, both `(tst l)` and `(tst r)` are executed. This commit fixes this issue by expanding `tst._match_1` during code generation. |
||
|---|---|---|
| .github | ||
| bin | ||
| doc | ||
| extras/latex | ||
| images | ||
| leanpkg | ||
| library | ||
| script | ||
| src | ||
| tests | ||
| tmp | ||
| .appveyor.yml | ||
| .clang-format | ||
| .codecov.yml | ||
| .gitignore | ||
| .travis.yml | ||
| LICENSE | ||
| README.md | ||
| License | Windows | Linux / macOS | Test Coverage | Chat |
|---|---|---|---|---|
![]() |
About
- Homepage
- Theorem Proving in Lean
- Core library
- Change Log
- For HoTT mode, please use Lean2.
Requirements
- C++11 compatible compiler
- CMake
- GMP (GNU multiprecision library)
Build Instructions
Miscellaneous
- Building Doxygen Documentation:
doxygen src/Doxyfile - Coding Style
- Library Style Conventions
- Git Commit Conventions
- Automatic Builds
- Syntax Highlight Lean Code in LaTeX
- Exporting, and reference type-checkers
