Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
Several combinators (e.g., `checkNoWsBefore`) access the "leading term" by retrieving the element on the top of the syntax stack. However, the `longestMatchFn` was accumulating successful matches on the syntax stack too. This commit makes sure the `longestMatchFn` always push the "leading term" before trying a parser. This commit also eliminates the `orelseFn` hack at `trailingLoopStep`. Now, we use `longestMatchFn` for all parsers. Note that we have to add a new combinator (`checkWsBeforeIfSymbol`) to make sure that `a[i]` cannot be parsed by the `app` parsing rule. Before removing the hack from `trailingLoopStep`, `a[i]` was correctly parsed as an `arrayRef`. After the change, the `app` parser is tried and it succeeds (IF we don't use `checkWsBeforeIfSymbol`). It is an application using the list literal `[i]`. The `checkWsBeforeIfSymbol` ensures that `a[i]` is not a valid `app`. cc @Kha |
||
|---|---|---|
| .github | ||
| doc | ||
| images | ||
| lean4-mode | ||
| nix | ||
| script | ||
| src | ||
| stage0 | ||
| tests | ||
| tmp | ||
| .clang-format | ||
| .codecov.yml | ||
| .gitattributes | ||
| .gitignore | ||
| CMakeLists.txt | ||
| 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.