Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
@kha @dselsam FYI The original motivation for saving/restoring the cache was not correctness, but cache size management. When we go inside a binder using the telescope methods, we extend the local context with new fresh free variables, execute the action `k` using the new extended local context, and then restore it. Any cached result containing these fresh variables is dead after executing `k`. So, `savingCache` here could be viewed as a "checkpoint". However, it also removes any cached entry that does not contain the new fresh variables. I found this inconvenient in practice, and it is the wrong choice in a few cases. Example: we have a `forall` expr (aka arrow), and use a telescope to go inside, and then invoke TC. If the telescope uses `savingCache`, we lose the cached TC instance witness. This is wasteful since the witness often doesn't even depend on the new fresh free variables created by the telescope. Thus, this commit removes the `savingCache` occurrences from the "telescope" methods. Users may still manually use it if they think it is appropriate. That is, they can write ```lean savingCache $ forallTelescope e $ fun xs body => <code> ``` if they really want to discard any new cache entry created while executing `<code>`. |
||
|---|---|---|
| .github | ||
| bin | ||
| doc | ||
| images | ||
| lean4-mode | ||
| nix | ||
| script | ||
| src | ||
| stage0 | ||
| tests | ||
| tmp/new-frontend | ||
| .clang-format | ||
| .codecov.yml | ||
| .gitattributes | ||
| .gitignore | ||
| default.nix | ||
| LICENSE | ||
| README.md | ||
| shell.nix | ||
We are currently developing Lean 4. Lean 3 is still the latest official release. This repository contains work in progress.
Important. Unless you are one of our collaborators
- We strongly suggest you use Lean 3.
- Pull requests are not welcome.
- New issues are not welcome, and will be closed without any feedback.