Skip to content

feat: clarify warning for semireducible definitions of class type - #14196

Merged
datokrat merged 11 commits into
leanprover:masterfrom
datokrat:paul/instance-reducibility-warning
Jul 13, 2026
Merged

datokrat merged 11 commits into
leanprover:masterfrom
datokrat:paul/instance-reducibility-warning

Conversation

@datokrat

@datokrat datokrat commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

This PR improves on the warnings and errors regarding reducibility attributes. Partially addresses #13351.

  • When trying to add a semireducible attribute, do not claim it is the default; it is not in the case of instance declarations.
  • Allow users to disable the reducibility warning on instances.
  • Do not warn on @[irreducible] instance declarations, in analogy to how we do not warn on attribute [instance] irreducibleDecl.

@github-actions github-actions Bot added toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN labels Jun 26, 2026
@leanprover-bot leanprover-bot added the builds-manual CI has verified that the Lean Language Reference builds against this PR label Jun 26, 2026
@leanprover-bot

leanprover-bot commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Reference manual CI status:

mathlib-nightly-testing Bot pushed a commit to leanprover-community/batteries that referenced this pull request Jun 26, 2026
mathlib-nightly-testing Bot pushed a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Jun 26, 2026
leanprover-bot added a commit to leanprover/reference-manual that referenced this pull request Jun 26, 2026
@mathlib-lean-pr-testing mathlib-lean-pr-testing Bot added the builds-mathlib CI has verified that Mathlib builds against this PR label Jun 26, 2026
@mathlib-lean-pr-testing

mathlib-lean-pr-testing Bot commented Jun 26, 2026

Copy link
Copy Markdown

Mathlib CI status (docs):

@datokrat
datokrat force-pushed the paul/instance-reducibility-warning branch from 48844ae to 7ed8c34 Compare July 8, 2026 07:12
mathlib-nightly-testing Bot pushed a commit to leanprover-community/batteries that referenced this pull request Jul 8, 2026
leanprover-bot added a commit to leanprover/reference-manual that referenced this pull request Jul 8, 2026
mathlib-nightly-testing Bot pushed a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Jul 8, 2026
@mathlib-lean-pr-testing mathlib-lean-pr-testing Bot added breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan and removed builds-mathlib CI has verified that Mathlib builds against this PR labels Jul 8, 2026
@datokrat
datokrat force-pushed the paul/instance-reducibility-warning branch from 2340ab4 to 869476d Compare July 9, 2026 13:12
mathlib-nightly-testing Bot pushed a commit to leanprover-community/batteries that referenced this pull request Jul 9, 2026
leanprover-bot added a commit to leanprover/reference-manual that referenced this pull request Jul 9, 2026
mathlib-nightly-testing Bot pushed a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Jul 9, 2026
@mathlib-lean-pr-testing mathlib-lean-pr-testing Bot added builds-mathlib CI has verified that Mathlib builds against this PR and removed breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan labels Jul 9, 2026
mathlib-nightly-testing Bot pushed a commit to leanprover-community/batteries that referenced this pull request Jul 10, 2026
mathlib-nightly-testing Bot pushed a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Jul 10, 2026
leanprover-bot added a commit to leanprover/reference-manual that referenced this pull request Jul 10, 2026
mathlib-nightly-testing Bot pushed a commit to leanprover-community/batteries that referenced this pull request Jul 10, 2026
mathlib-nightly-testing Bot pushed a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Jul 10, 2026
leanprover-bot added a commit to leanprover/reference-manual that referenced this pull request Jul 10, 2026
mathlib-nightly-testing Bot pushed a commit to leanprover-community/batteries that referenced this pull request Jul 10, 2026
mathlib-nightly-testing Bot pushed a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Jul 10, 2026
leanprover-bot added a commit to leanprover/reference-manual that referenced this pull request Jul 10, 2026
mathlib-nightly-testing Bot pushed a commit to leanprover-community/batteries that referenced this pull request Jul 10, 2026
mathlib-nightly-testing Bot pushed a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Jul 10, 2026
leanprover-bot added a commit to leanprover/reference-manual that referenced this pull request Jul 10, 2026
mathlib-nightly-testing Bot pushed a commit to leanprover-community/batteries that referenced this pull request Jul 10, 2026
mathlib-nightly-testing Bot pushed a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Jul 10, 2026
leanprover-bot added a commit to leanprover/reference-manual that referenced this pull request Jul 10, 2026
@datokrat
datokrat marked this pull request as ready for review July 10, 2026 13:16
@datokrat datokrat added the changelog-language Language features and metaprograms label Jul 13, 2026
@datokrat
datokrat added this pull request to the merge queue Jul 13, 2026
Merged via the queue into leanprover:master with commit 0d2a484 Jul 13, 2026
28 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

builds-manual CI has verified that the Lean Language Reference builds against this PR builds-mathlib CI has verified that Mathlib builds against this PR changelog-language Language features and metaprograms 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