You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add +all option to exact? and apply? (#11556)
This PR adds a `+all` option to `exact?` and `apply?` that collects all
successful lemmas instead of stopping at the first complete solution.
When `+all` is enabled:
- `exact?` shows all lemmas that completely solve the goal (admits the
goal with `sorry`)
- `apply?` shows all lemmas including both complete and partial
solutions
🤖 Prepared with Claude Code
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Adds +all to exact?/apply? to collect all successful lemmas (don’t
stop at first), updates search flow and suggestion reporting, and
enhances LazyDiscrTree to extract/accumulate dropped (star-indexed)
lemmas; tests added/updated.
>
> - **Tactics: `exact?` / `apply?`**
> - Add config flag `all : Bool` (`+all`) to collect all successful
lemmas instead of stopping at the first.
> - `exact?` now separates and reports complete vs incomplete solutions;
with `+all`, aggregates complete solutions into a single "Try these:"
message and admits the goal.
> - **LibrarySearch engine**
> - Thread `collectAll` through `librarySearch`, `librarySearch'`, and
`tryOnEach`, continuing search to collect complete solutions when
enabled.
> - Adjust star-lemma fallback: only used when no complete solution
found in primary search (and if enabled).
> - **LazyDiscrTree**
> - Add ability to extract and append dropped entries via
`droppedEntriesRef` when building import/module trees; use this to cache
star-indexed lemmas.
> - Update `createModuleTreeRef`/`findMatches` to pass and accumulate
dropped entries.
> - **Tests**
> - Update existing expectations for info messages.
> - Add `tests/lean/run/library_search_all.lean` covering `+all` (both
`exact?` and `apply?`) and interactions with `-star`/star-indexed
lemmas.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
2c6a32e. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Claude <[email protected]>
0 commit comments