feat: add Decidable, Fintype, Encodable linters#10235
feat: add Decidable, Fintype, Encodable linters#10235
Decidable, Fintype, Encodable linters#10235Conversation
Also rename `Presieve.extensive` to `Presieve.Extensive` to follow the naming convention.
- don't assume `DecidableEq` in `card_edgeFinset_le_card_choose_two`; - make `edgeFinset_deleteEdges` work with any `Fintype G.edgeSet` and `Fintype (G.deleteEdges s).edgeSet` instances; - don't assume `DecidbaleEq` in theorems about `DeleteFar`.
|
Note: I'm working on |
|
This PR is flagged as awaiting-author, what are you planning to do before this is ready for review? I would like to see this PR in Mathlib somewhat soon so I am willing to help out fix some of the build errors. |
|
This pull request has conflicts, please merge |
|
I started (and finished) porting the One major difference is that I wrote a syntax linter instead of an environment linter, so that it runs while editing. I also tried to take some care with performance, and avoided telescopes entirely until constructing the suggestion itself (which is allowed to be expensive, since it's impermanent). I also only lint user-written declarations due to searching the infotrees instead of the environment (which goes a bit beyond Let me know what you think! I'm happy to pick up the torch if that's alright. |
|
Can this PR be closed now, or is there anything else that's missing? If so, we could track that in #35340. |
This PR ports the
decidableClassical,fintypeFiniteandencodableCountablelinters from mathlib3: all three are environment linters which flag declarations that have a hypothesis[Decidable p]etc., but do not use the underlying assumption in this type. Restructuring the code can make the statement more general.The implementation is in fact quite general, and can easily adapt to include further types. PRs #17518 and #17519 are two examples of further such linters.
Please don't fix the failures related to
HasFDerivWithinAt.pi. Finiteness assumptions in these lemmas will be completely removed during porting to TVS.