Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
This PR enables the new E-matching pattern inference heuristic for `grind`, implemented in PR #10422. **Important**: Users can still use the old pattern inference heuristic by setting: ```lean set_option backward.grind.inferPattern true ``` In PR #10422, we introduced the new modifier `@[grind!]` for enabling the minimal indexable subexpression condition. This option can now also be set in `grind` parameters. Example: ```lean opaque f : Nat → Nat opaque fInv : Nat → Nat axiom fInv_f : fInv (f x) = x /-- trace: [grind.ematch.pattern] fInv_f: [f #0] -/ #guard_msgs in set_option trace.grind.ematch.pattern true in example {x y} : f x = f y → x = y := by /- The modifier `!` instructs `grind` to use the minimal indexable subexpression (i.e., `f x` in this case). -/ grind [!fInv_f] ``` |
||
|---|---|---|
| .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.