Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
In Lean4, we will not generate non dependent recursors for inductive predicates. The main goal is to make the shape of the automatically generated recursors more uniform. The non uniform representation is leftover from Lean2. In Lean2, we wanted to support different kernels with different features. For example: we could create proof relevant kernels, no impredicative universe, etc. Recall that, in a kernel with an impredicative Prop and no proof irrelevance, inductive predicates without dependent elimination are weaker that inductive predicates with dependent elimination. When proof irrelevance is enabled, we can generate the dependent recursor from the non dependent one. Actually, the module drec.cpp generates the dependent recursor. Now, we only support one kind of kernel, and it doesn't make sense anymore to generate non dependent recursors for inductive predicates. This would only produce an unnecessary asymmetry on the inductive datatype module. Remark: we had to create non dependent recursors to help the elaborator. This can be avoid if we improve the elaborator. I will do that in the new elaborator implemented in Lean. Remark: equation lemmas are broken for definitions that pattern match on nested inductive datatypes. The problem is the super messy `prove_eq_rec_invertible_aux` function. This function will not be needed after I finish the new inductive datatype support in the kernel. cc @kha |
||
|---|---|---|
| .github | ||
| bin | ||
| doc | ||
| extras/latex | ||
| gen | ||
| images | ||
| leanpkg | ||
| library | ||
| old_tests/tests | ||
| packages | ||
| script | ||
| src | ||
| tests | ||
| tmp | ||
| .appveyor.yml | ||
| .clang-format | ||
| .codecov.yml | ||
| .gitattributes | ||
| .gitignore | ||
| .travis.yml | ||
| LICENSE | ||
| README.md | ||
| License | Windows | Linux / macOS | Test Coverage | Chat |
|---|---|---|---|---|
![]() |
About
- Homepage
- Theorem Proving in Lean
- Core library
- Change Log
- FAQ
- For HoTT mode, please use Lean2.
Installation
Stable and nightly binary releases of Lean are available on the homepage. For building Lean from source, see the 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
