Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
Find a file
Robert J. Simmons 08c87b2ad3
feat: focused error messages for named examples (#11714)
This PR gives a focused error message when a user tries to name an
example, and tweaks error messages for attempts to define multiple
opaque names at once.

## Example errors

```
example x : 1 == 1 := by grind
```

Current message:
```
Failed to infer type of binder `x`

Note: Because this declaration's type has been explicitly provided, all parameter types and holes (e.g., `_`) in its header are resolved before its body is processed; information from the declaration body cannot be used to infer what these values should be
```

New message:
```
Failed to infer type of binder `x`

Note: Examples don't have names. The identifier `x` is being interpreted as a parameter `(x : _)`.
```

## Plural-aware identifier lists

Both the example errors and opaque errors understand pluralization and
use oxford commas.

```
opaque a b c : Nat
```

Current message:
```
Failed to infer type of binder `c`

Note: Multiple constants cannot be declared in a single declaration. The identifier(s) `b`, `c` are being interpreted as parameters `(b : _)`, `(c : _)`.
```

New message:
```
Failed to infer type of binder `c`

Note: Multiple constants cannot be declared in a single declaration. The identifiers `b` and `c` are being interpreted as parameters `(b : _)` and `(c : _)`.```
2025-12-17 14:54:41 +00:00
.claude chore: add guidance to not merge PRs autonomously in release command (#11661) 2025-12-14 05:17:42 +00:00
.github fix: remove batteries tag check from PR mathlib CI (#11707) 2025-12-17 08:53:04 +00:00
doc chore: update release docs/scripts for lean-fro.org (#11648) 2025-12-13 11:06:17 +00:00
images
releases_drafts
script chore: add missing repositories to release_repos.yml (#11668) 2025-12-17 02:33:53 +00:00
src feat: focused error messages for named examples (#11714) 2025-12-17 14:54:41 +00:00
stage0 chore: update stage0 2025-12-17 11:51:52 +00:00
tests feat: focused error messages for named examples (#11714) 2025-12-17 14:54:41 +00:00
.gitattributes doc: grove: update and add String data (#11551) 2025-12-08 16:49:37 +00:00
.gitignore
.gitpod.Dockerfile
.gitpod.yml
.ignore
CMakeLists.txt fix: cadical dynamic dependencies (#11475) 2025-12-02 13:54:26 +00:00
CMakePresets.json chore: CI: enable leak sanitizer again (#11339) 2025-11-27 18:32:35 +00:00
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

Installation

See Install Lean.

Contributing

Please read our Contribution Guidelines first.

Building from Source

See Building Lean.