Skip to content

feat: allow @[cbv_eval] to override @[cbv_opaque]#12944

Merged
wkrozowski merged 1 commit intoleanprover:masterfrom
wkrozowski:wojciech/cbv_attributes_interaction
Mar 17, 2026
Merged

feat: allow @[cbv_eval] to override @[cbv_opaque]#12944
wkrozowski merged 1 commit intoleanprover:masterfrom
wkrozowski:wojciech/cbv_attributes_interaction

Conversation

@wkrozowski
Copy link
Copy Markdown
Contributor

This PR changes the interaction between @[cbv_opaque] and @[cbv_eval]
attributes in the cbv tactic. Previously, @[cbv_opaque] completely blocked
all reduction including @[cbv_eval] rewrite rules. Now, @[cbv_eval] rules
can fire on @[cbv_opaque] constants, allowing users to provide custom rewrite
rules without exposing the full definition. Equation theorems, unfold theorems,
and kernel reduction remain suppressed for opaque constants.

🤖 Generated with Claude Code

This PR changes the interaction between `@[cbv_opaque]` and `@[cbv_eval]`
attributes in the `cbv` tactic. Previously, `@[cbv_opaque]` completely blocked
all reduction including `@[cbv_eval]` rewrite rules. Now, `@[cbv_eval]` rules
can fire on `@[cbv_opaque]` constants, allowing users to provide custom rewrite
rules without exposing the full definition. Equation theorems, unfold theorems,
and kernel reduction remain suppressed for opaque constants.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wkrozowski wkrozowski requested a review from leodemoura as a code owner March 17, 2026 11:09
@wkrozowski wkrozowski added the changelog-tactics User facing tactics label Mar 17, 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 Mar 17, 2026
@leanprover-bot
Copy link
Copy Markdown
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI can not be attempted yet, as the nightly-testing-2026-03-17 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-manual, reference manual CI should run now. You can force reference manual CI using the force-manual-ci label. (2026-03-17 12:08:12)

mathlib-nightly-testing bot pushed a commit to leanprover-community/batteries that referenced this pull request Mar 17, 2026
@github-actions github-actions bot added the mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN label Mar 17, 2026
mathlib-nightly-testing bot pushed a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Mar 17, 2026
@mathlib-lean-pr-testing mathlib-lean-pr-testing bot added the builds-mathlib CI has verified that Mathlib builds against this PR label Mar 17, 2026
@mathlib-lean-pr-testing
Copy link
Copy Markdown

Mathlib CI status (docs):

@wkrozowski wkrozowski added this pull request to the merge queue Mar 17, 2026
Merged via the queue into leanprover:master with commit 6160d17 Mar 17, 2026
30 checks passed
wkrozowski added a commit to leanprover/reference-manual that referenced this pull request Mar 17, 2026
…que` attributes (#808)

This PR changes the description of interaction of `cbv_eval` and
`cbv_opaque` attributes, to reflect leanprover/lean4#12944.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

builds-mathlib CI has verified that Mathlib builds against this PR changelog-tactics User facing tactics mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN 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