Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
The matches returned by the lazy discriminator tree are partially constrained by a priority, but ties are broken by the order in which keys are traversed and the order of declarations. This PR changes the match key traversal to use an explicit stack rather than recursion and implicitly changes the order in which results are returned to favor left-matches first e.g., given the term `f a b` with constants `f a b`, and a tree with patterns `f a x -> 1` `f x b -> 2` that have the same priority, this will return `#[1, 2]` since the early matches for the key `a` are returned before the match for `x` which has a star. This appears to address the [lower quality results mentioned on zulip](https://leanprover.zulipchat.com/#narrow/stream/428973-nightly-testing/topic/Mathlib.20status.20updates/near/429955747). |
||
|---|---|---|
| .github | ||
| doc | ||
| images | ||
| nix | ||
| script | ||
| src | ||
| stage0 | ||
| tests | ||
| .gitattributes | ||
| .gitignore | ||
| .ignore | ||
| CMakeLists.txt | ||
| 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
- Manual
- Release notes starting at v4.0.0-m3
- Examples
- External Contribution Guidelines
- FAQ
Installation
See Setting Up Lean.
Contributing
Please read our Contribution Guidelines first.
Building from Source
See Building Lean.