Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
This PR adds more MPL spec lemmas for all combinations of `for` loops, `fold(M)` and the `filter(M)/filterMap(M)/map(M)` iterator combinators. These kinds of loops over these combinators (e.g. `it.mapM`) are first transformed into loops over their base iterators (`it`), and if the base iterator is of type `Iter _` or `IterM Id _`, then another spec lemma exists for proving Hoare triples about it using an invariant and the underlying list (`it.toList`). The PR also fixes a bug that MPL always assigns the default priority to spec lemmas if `Std.Tactic.Do.Syntax` is not imported and a bug that low-priority lemmas are preferred about high-priority ones. For context, the MPL bug was related to the fact that the `Attr.spec` syntax is not built-in. Therefore, Lean falls back to the `Attr.simple` syntax, which *basically* also works, but which stores the priority at a different position. The routine to extract the priority does not consider this and so it falls back to the default priority given an `Attr.simple` syntax object. |
||
|---|---|---|
| .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.