Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
This PR introduces the `[grind_eq]` attribute, designed to annotate equational theorems and functions for heuristic instantiations in the `grind` tactic. When applied to an equational theorem, the `[grind_eq]` attribute instructs the `grind` tactic to automatically use the annotated theorem to instantiate patterns during proof search. If applied to a function, it marks all equational theorems associated with that function. ```lean @[grind_eq] theorem foo_idempotent : foo (foo x) = foo x := ... @[grind_eq] def f (a : Nat) := match a with | 0 => 10 | x+1 => g (f x) ``` In the example above, the `grind` tactic will add instances of the theorem `foo_idempotent` to the local context whenever it encounters the pattern `foo (foo x)`. Similarly, functions annotated with `[grind_eq]` will propagate this annotation to their associated equational theorems. |
||
|---|---|---|
| .github | ||
| doc | ||
| images | ||
| nix | ||
| 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
- FAQ
Installation
See Setting Up Lean.
Contributing
Please read our Contribution Guidelines first.
Building from Source
See Building Lean (documentation source: doc/make/index.md).