Repository navigation
chore(Data/Set): reduce defeq abuse of Set α = α → Prop - #39110
SnirBroshi wants to merge 11 commits into
Conversation
PR summary e286da2d98Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
|
!bench |
|
Benchmark results for e852052 against 043e9e0 are in. No significant results found. @SnirBroshi
No significant changes detected. |
Co-authored-by: Monica Omar <[email protected]>
|
|
||
| /-- A set of `α`s is equivalent to a predicate on elements of type `α`. -/ | ||
| @[simps] | ||
| def setEquivPredicate (α : Type*) : Set α ≃ (α → Prop) where |
There was a problem hiding this comment.
I know I suggested this name, but what about Set.toProp (or is that too vague?)? Let's have another person comment on this name. Besides that, looks good to me.
maintainer delegate?
There was a problem hiding this comment.
Set.toProp or Set.toPredicate would be better here for me. (Set.toPred might work, but would be confused with the predecessor function.) It's a common operation so having a short (but less intuitive) name is better.
Trying to think of different names, I came up with: this is setOf but as an equiv, so Equiv.setOf or setOfEquiv. But neither of those options really seem more meaningful.
|
🚀 Pull request has been placed on the maintainer queue by themathqueen. |
|
How are you finding these btw? I think @urkud has a branch and a PR draft turning |
|
Basically their PRs were what inspired me to help, and I locally turned (to be clear, I don't have any unpublished progress towards this goal.) |
Vierkantor
left a comment
There was a problem hiding this comment.
Thanks for cleaning this up! I think Set.toProp is a good option. I would slightly prefer Set.toPred(icate) (if @themathqueen agrees). In any case, assuming we can agree on a name this looks good to me. Thanks!
bors d+
|
✌️ SnirBroshi can now approve this pull request. To approve and merge a pull request, simply reply with |
|
Note that merging this PR will create unneeded merge conflicts with my branch. Please coordinate on Zulip. |
|
🚫 All delegations have been removed from this PR. To re-add a delegation, reply with |
|
Coordinating on Zulip wouldn't be a bad idea (please cc me @SnirBroshi when you open the thread). I don't think the merge conflicts would be bad at all with your branch @urkud (this PR is pretty small). In any case, I think we will want the equivalence defined here. |
|
#PR reviews > #39110 reduce `Set` defeq abuse in `Data/Set/` (I didn't want to create some big "mathlib4 > let's fix Set defeq abuse" yet) |
|
@urkud, pinging you since this PR has been sitting here for three weeks now |
|
This pull request has conflicts, please merge |
|
This pull request has conflicts, please merge |
|
Since the bigger refactoring PR has added the definition and stuff that is in this PR, should we close this? Or at least put the |
|
Thanks @SnirBroshi :) |
These are among the first places that would fail if
Set αwasn't defeq toα → Prop.