Skip to content

feat: add genLocal configuration option for grind#13699

Merged
leodemoura merged 2 commits into
masterfrom
grind_gen_issue_2
May 11, 2026
Merged

feat: add genLocal configuration option for grind#13699
leodemoura merged 2 commits into
masterfrom
grind_gen_issue_2

Conversation

@leodemoura
Copy link
Copy Markdown
Member

@leodemoura leodemoura commented May 11, 2026

This PR adds a new grind configuration option, genLocal, that controls the
maximum term generation for local theorems (e.g., hypotheses). It defaults to
8, same value as gen and applies whenever
grind instantiates a theorem whose origin is local rather than a declaration
or user-provided term. Since users have little control over the patterns used
for local theorems, a tighter generation bound is a reasonable default.

Internally, E-matching now selects the generation bound via a new
getMaxGeneration helper that dispatches on the theorem's Origin: .stx and
.decl use gen, everything else uses genLocal.

@leodemoura leodemoura added the changelog-tactics User facing tactics label May 11, 2026
@leodemoura leodemoura enabled auto-merge May 11, 2026 02:24
@leodemoura leodemoura added this pull request to the merge queue May 11, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 11, 2026
@github-actions github-actions Bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label May 11, 2026
@mathlib-lean-pr-testing
Copy link
Copy Markdown

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 2674a1307cb6d4ad41915d852725534718b2b60b --onto a71f158f7bd96ff9ea846f7ff4cc658de3c8b0f9. You can force Mathlib CI using the force-mathlib-ci label. (2026-05-11 03:14:10)

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI will not be attempted unless your PR branches off the nightly-with-manual branch. Try git rebase 2674a1307cb6d4ad41915d852725534718b2b60b --onto a71f158f7bd96ff9ea846f7ff4cc658de3c8b0f9. You can force reference manual CI using the force-manual-ci label. (2026-05-11 03:14:11)

@leodemoura leodemoura enabled auto-merge May 11, 2026 03:15
@leodemoura leodemoura added this pull request to the merge queue May 11, 2026
Merged via the queue into master with commit d98f40c May 11, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-tactics User facing tactics toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants