Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
This PR reverts a lot of the changes done in #8308. We practically encountered situations such as: ``` fun y (z) := let x := inst mkInst x z f y ``` Where the instance puller turns it into: ``` let x := inst fun y (z) := mkInst x z f y ``` The current heuristic now discovers `x` being in scope at the call site of `f` and being used under a binder in `y` and thus blocks pulling in `x` to the specialization, abstracting over an instance. According to @zwarich this was done at the time either due to observed stack overflows or pulling in computation into loops. With the current configuration for abstraction in specialization it seems rather unlikely that we pull in a non trivial computation into a loop with this. We also practically didn't observe stack overflows in our tests or benchmarks. Cameron speculates that the issues he observed might've been fixed otherwise by now. Crucial note: Deciding not to abstract over ground terms *might* cause us to pull in computationally intensive ground terms into a loop. We could decide to weaken this to just instance terms though of course even computing instances might end up being non-trivial. |
||
|---|---|---|
| .claude | ||
| .github | ||
| doc | ||
| images | ||
| releases_drafts | ||
| script | ||
| src | ||
| stage0 | ||
| tests | ||
| .gitattributes | ||
| .gitignore | ||
| .gitpod.Dockerfile | ||
| .gitpod.yml | ||
| .ignore | ||
| CMakeLists.txt | ||
| CMakePresets.json | ||
| CODEOWNERS | ||
| CONTRIBUTING.md | ||
| flake.lock | ||
| flake.nix | ||
| lean-toolchain | ||
| lean.code-workspace | ||
| LICENSE | ||
| LICENSES | ||
| README.md | ||
| RELEASES.md | ||
This is the repository for Lean 4.
About
- Quickstart
- Homepage
- Theorem Proving Tutorial
- Functional Programming in Lean
- Documentation Overview
- Language Reference
- Release notes starting at v4.0.0-m3
- Examples
- External Contribution Guidelines
Installation
See Install Lean.
Contributing
Please read our Contribution Guidelines first.
Building from Source
See Building Lean.