Skip to content

[Merged by Bors] - chore: clean up more unused Decidable* instances in types#31934

Closed
thorimur wants to merge 2 commits intoleanprover-community:masterfrom
thorimur:clean-upunused-decidable
Closed

[Merged by Bors] - chore: clean up more unused Decidable* instances in types#31934
thorimur wants to merge 2 commits intoleanprover-community:masterfrom
thorimur:clean-upunused-decidable

Conversation

@thorimur
Copy link
Copy Markdown
Contributor

Found by #10235 and #31142.


Open in Gitpod

@thorimur thorimur marked this pull request as ready for review November 22, 2025 03:36
@thorimur thorimur added easy < 20s of review time. See the lifecycle page for guidelines. awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. labels Nov 22, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 22, 2025

PR summary b3cf7a02d3

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

No declarations were harmed in the making of this PR! 🐙

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@github-actions github-actions bot added the t-ring-theory Ring theory label Nov 22, 2025
@github-actions github-actions bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Nov 22, 2025
@sgouezel
Copy link
Copy Markdown
Contributor

bors r+

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Nov 22, 2025
mathlib-bors bot pushed a commit that referenced this pull request Nov 22, 2025
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Nov 22, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title chore: clean up more unused Decidable* instances in types [Merged by Bors] - chore: clean up more unused Decidable* instances in types Nov 22, 2025
@mathlib-bors mathlib-bors bot closed this Nov 22, 2025
mathlib-bors bot pushed a commit that referenced this pull request Nov 29, 2025
This PR turns on the `unusedDecidableInType` syntax linter (#31142) after fixing the remaining violations in #31831, #31934, and #32153.

This also imports the linter into Mathlib.Init and adds the linter to the Mathlib standard set. Given that classicality is embedded in Lean, this is probably the behavior downstream repos who use the mathlib standard set want; if they are specifically constructive repos, the linter can always be turned off in the lakefile.

We exempt the entirety of [Mathlib/Data/Fintype/Quotient.lean](https://github.com/leanprover-community/mathlib4/pull/31747/files#diff-9591d2f3828bee189ea954bc33586ce451536bf00792362f7cdca4f5a8551207), [Mathlib/Order/Heyting/Regular.lean](https://github.com/leanprover-community/mathlib4/pull/31747/files#diff-af85d99e5d2f5561fe837f662f179c58f1ebe2a4ed0432a15260199883850c50), [Mathlib/Logic/Encodable/Basic.lean](https://github.com/leanprover-community/mathlib4/pull/31747/files#diff-db01c9a2d4726fe7ca0e6eb18a7cd485b5a9c6b26ba422dfbe501dcebef3cf77) and a declaration in [Mathlib/Computability/Halting.lean](https://github.com/leanprover-community/mathlib4/pull/31747/files#diff-d47323ee8b4b2321052b4be93715f8b2f3f840f76ec441d8bf75c834b8665b32) since constructivity is desired there. We also exempt `dec_em'`, which is a variant of `Decidable.em` but with the disjuncts reversed.

Many prior violations have already been fixed through the use of #10235, hence the small number of violations picked up by the syntax linter.

Co-authored-by: thorimur <thomasmurrills@gmail.com>
Co-authored-by: Michael Rothgang <rothgang@math.uni-bonn.de>
alok added a commit to alok/mathlib4 that referenced this pull request Mar 17, 2026
…lib4

* 'master' of https://github.com/leanprover-community/mathlib4: (3130 commits)
  feat(SetTheory/ZFC): add `ZFSet.card` (leanprover-community#29365)
  feat: grind annotations for `choose_spec` (leanprover-community#31927)
  chore(scripts): update nolints.json (leanprover-community#31975)
  feat(Analysis): cos (n * π) = (-1) ^ n (leanprover-community#31971)
  chore: rename `mul_le_mul_right'` to `mul_le_mul_left` (leanprover-community#30242)
  chore: update Mathlib dependencies 2025-11-22 (leanprover-community#31955)
  feat(MeasureTheory): ae-measurability notation wrt non-standard sigma-algebra (leanprover-community#31910)
  doc: add missing spaces around doc code blocks (leanprover-community#31917)
  chore: update Mathlib dependencies 2025-11-22 (leanprover-community#31945)
  chore: shortcut instance for `Nat` to be mul-torsion-free (leanprover-community#31027)
  doc(Topology/Algebra/Algebra): outdated TODO (leanprover-community#31944)
  feat(EqHaar): add `addHaar_nnreal_smul` (leanprover-community#31922)
  chore(Algebra): make invertibleInv an instance (leanprover-community#31916)
  chore(Algebra): change two statements in CubicDiscriminant (leanprover-community#31912)
  chore(MeasureTheory): mark `map_dirac`  as simp (leanprover-community#31909)
  feat: `LinearOrder` instance for `Empty` (leanprover-community#31889)
  chore: deprecate all remaining modules in `Analysis/NormedSpace` (leanprover-community#31913)
  feat(SimpleGraph): weaker condition for paths in acyclic graphs (leanprover-community#25814)
  chore: do not set `group` when declaring option (leanprover-community#31888)
  chore: clean up more unused `Decidable*` instances in types (leanprover-community#31934)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

easy < 20s of review time. See the lifecycle page for guidelines. ready-to-merge This PR has been sent to bors. t-ring-theory Ring theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants