Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
This PR gives suggestions based on the currently-available constants when projecting from an unknown type. ## Example: single suggestion in namespace This was the originally motivating example, as the string refactor led to a number of anonymous-lambda-expressions with `Char` functions that were no longer recognized as such. ```lean4 example := (·.isWhitespace) ``` Before: ``` Invalid field notation: Type of x✝ is not known; cannot resolve field `isWhitespace` ``` The message is unchanged, but this PR adds a hint: ``` Hint: Consider replacing the field projection `.isWhitespace` with a call to the function `Char.isWhitespace`. ``` ## Example: single suggestion in namespace ```lean4 example := fun n => n.succ ``` Before: ``` Invalid field notation: Type of n is not known; cannot resolve field `succ` ``` The message is unchanged, but this PR adds a hint: ``` Hint: Consider replacing the field projection with a call to one of the following: • `Fin.succ` • `Nat.succ` • `Std.PRange.succ` ``` |
||
|---|---|---|
| .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.