Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
This PR adds support for `try?` to use induction; it will only perform induction on inductive types defined in the current namespace and/or module; so in particular for now it will not induct on built-in inductives such as `Nat` or `List`. This is stacked on top of #11132, and there are overlapping changes. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Adds vanilla induction suggestions to `try?`, updates collection of inductive candidates, and tests the new behavior on custom inductive types. > > - **Try tactic pipeline**: > - Add vanilla induction generators (`mkIndStx`, `mkAllIndStx`) that try `induction <var> <;> …`, with fallback via `expose_names` when needed. > - Integrate induction into `mkTryEvalSuggestStx`, alongside existing atomic, suggestions, and function-induction options. > - **Collector updates (`Try/Collect.lean`)**: > - Enhance `checkInductive` to `whnf` the type and use `getAppFn` to detect inductive heads, populating `indCandidates`. > - **Tests**: > - New `tests/lean/run/try_induction.lean` covering suggestions for `induction` on custom inductives, interaction with `grind`, and coexistence with `fun_induction`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit b357990c97d0855418202626dad3a73cdcae8a86. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .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.