Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
The equational compiler was failing to generate equational lemmas for equations such as: def f : nat → nat → nat | (x+1) (y+1) := f (x+10) y | _ _ := 1 It would fail when trying to prove the following equation: forall x, f 0 x = 1 using a "refl" proof. This equation does not hold definitionally. It is not blocked by the internal pattern matching based on the cases_on recursor, but it is blocked by the outer most brec_on used to implement structural recursion. The solution is to "complete" the set of equations. So, the structural_rec module will replace the equation above with def f : nat → nat → nat | (x+1) (y+1) := f (x+10) y | _ 0 := 1 | _ (y+1) := 1 and then (as before) def f : Pi (x y : nat), below y → nat | (x+1) (y+1) F := F^.fst^.fst (x+10) | _ 0 F := 1 | _ (y+1) F := 1 |
||
|---|---|---|
| bin | ||
| doc | ||
| extras | ||
| images | ||
| library | ||
| old_library | ||
| script | ||
| src | ||
| tests | ||
| tmp | ||
| .appveyor.yml | ||
| .appveyor.yml.in | ||
| .codecov.yml | ||
| .gitignore | ||
| .travis.yml | ||
| .travis.yml.in | ||
| LICENSE | ||
| README.md | ||
| License | Windows | Linux / macOS | Test Coverage |
|---|---|---|---|
![]() |
About
- Homepage
- Theorem Proving in Lean
- Standard Library
- Emacs Mode
- For HoTT mode, please use Lean2.
Requirements
- C++11 compatible compiler
- CMake
- GMP (GNU multiprecision library)
- MPFR (GNU MPFR Library)
- (optional) gperftools (There is currently an issue with gperftools on macOS Sierra. For now, either don't install it, or pass the flag
-DTCMALLOC=OFFto CMake when building to not use it.)
Installing required packages at
Windows
Linux
OS X
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
