Mirror of https://github.com/leanprover/lean2 in case it ever disappears
8214c7add4
Before this commit, the elaborator was solving constraints of the form ctx |- (?m x) == (f x) as ?m <- (fun x : A, f x) where A is the domain of f. In our kernel, the terms f and (fun x, f x) are not definitionally equal. So, the solution above is not the only one. Another possible solution is ?m <- f Depending of the circumstances we want ?m <- (fun x : A, f x) OR ?m <- f. For example, when Lean is elaborating the eta-theorem in kernel.lean, the first solution should be used: ?m <- (fun x : A, f x) When we are elaborating the axiom_of_choice theorem, we need to use the second one: ?m <- f Of course, we can always provide the parameters explicitly and bypass the elaborator. However, this goes against the idea that the elaborator can do mechanical steps for us. This commit addresses this issue by creating a case-split ?m <- (fun x : A, f x) OR ?m <- f Another solution is to implement eta-expanded normal forms in the Kernel. With this change, we were able to cleanup the following "hacks" in kernel.lean: @eps_ax A (nonempty_ex_intro H) P w Hw @axiom_of_choice A B P H where we had to explicitly provided the implicit arguments This commit also improves the imitation step for Pi-terms that are actually arrows. Signed-off-by: Leonardo de Moura <leonardo@microsoft.com> |
||
---|---|---|
doc | ||
examples/lean | ||
script | ||
src | ||
tests | ||
.gitignore | ||
.travis.osx.yml | ||
.travis.windows.yml | ||
.travis.yml | ||
LICENSE | ||
README.md |
Ubuntu | OS X | Windows | Coverage | Builds / UnitTests / Dynamic Analyses |
---|---|---|---|---|
http://build.leanprover.net |
About
Requirements
- C++11 compatible compiler: g++ (version >= 4.8.1), or clang++ (version >= 3.3)
- CMake
- GMP (GNU multiprecision library)
- MPFR (GNU MPFR Library)
- Lua 5.2 or 5.1, or LuaJIT 2.0
- (optional) gperftools
- (optional) Boost (version >= 1.54), we can build Lean using boost::thread instead of std::thread. When using Boost, Lean can modify the thread stack size.
Installing required packages at
Build Instructions
Miscellaneous
- Testing and Code Coverage
- Building Doxygen Documentation:
doxygen src/Doxyfile
- Coding style
- Git Commit Convention
- Automatic builds