-
Notifications
You must be signed in to change notification settings - Fork 247
Confusion about _↔_ (Function.Inverse and Function.Bundles) #1187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I ran into the same yesterday. I believe you are correct that Personally I would recommend using the new hierarchy, even if you need to port some proofs from the std lib. It is much easier to work with IMO. |
Yes apologies, this is my fault. I failed to add sufficient documentation and this has tripped several people up recently. As @ajrouvoet says, I've opened #1188 to add this information to the files.
That's fantastic to hear that you've found it easier to use 🎉 If you have ported any proofs using the new hierarchy any PRs would be greatly appreciated. I've got several lurking around in branches that I need to tidy up and submit. |
I should have added: bring on the follow-up questions! |
For sure! Having quick access to the
I haven't, but of course! |
@MatthewDaggitt Should what used to be in TypeIsomorphisms not just be in the appropriate Properties modules of various type formers? I would expect the following for example in Data.Sum.Properties:
etc |
They should definitely be under the type formers directory. I think as we discussed in #1141 it would be more appropriate for them to go under |
Sorry I meant |
I have some of these around now, using the new function hierarchy and will make a PR sometime soon. |
By the way, what do you think of @alexarice's suggestion in #1156? His definitions seem to make the properties compose much better? We could still export the existing definitions from the structures and bundles for use? |
@ajrouvoet could you post here which ones you do have? I have some too, and I don't want to duplicate the work. [Mine need a lot of work to submit as PR as they're embedded in an old library.] |
Not many, just the ones I needed. Which was (for now) just the CommutativeMonoid structure of \uplus and its dependencies. |
Looks nice; I haven't used the new setup enough to have run in the issues this solves, so I can't really say something useful. |
Ok, I've got up to CommutativeSemiring (well, Symmetric Rig Groupoid, to be fancy) in pi-dual. I've been meaning to port. My time is finally freeing up a bit, so I think I might be able to do it. |
There is always a bigger fish :) I'll wait for your PR then, since I have what I need and am not in a hurry. |
Sorry to take a while on this. The biggest follow-up question was indeed where to put the ported routines. Also, I was going to try hard to 'deconstruct' the |
There are two definitions of
_↔_
in the library, at Function.Inverse and Function.Bundles. They are closely related, but different.First, one must be careful to not import both
Function
(which re-exportsFunction.Bundles
) andFunction.Inverse
in the same module, else all sorts of clashes onInverse
ensures.As far as I can tell, the one in
Function.Bundles
is newer, and likely the one to be used in the future.However, internally the library uses the one from
Function.Inverse
a lot more. In particular,Function.Related.TypeIsomorphisms
.So: which
_↔_
should I be using? [The answer will lead to a bunch of follow-up questions...]The text was updated successfully, but these errors were encountered: