-
Notifications
You must be signed in to change notification settings - Fork 239
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
Reimplement Permutation.Propositional
in terms of Permutation.Setoid
#1354
Reimplement Permutation.Propositional
in terms of Permutation.Setoid
#1354
Comments
Parameterise |
Blocked by typed pattern synonyms: agda/agda#2069. |
I remember this causing me a huge amount of pain when working with these things. Maybe we only need typed pattern synonyms to do it in a backwards compatible manner. Going to look at it this afternoon as one possible last issue to sneak into v2.0. |
I'm completely in sympathy with wanting to sneak more in to v2.0... Your activity has been prodigious in the last few days alone, and it's hard not to think a moments pause might be worthwhile, before resuming with a planned v2.1 for say, sometime in the window Jan-Mar 2024. That gives us, and users a window in which to upgrade, during which we move forward with issues/PRs like these, and others such as #2149 (which I might otherwise have lobbied harder for now, if I'd had time for the actual breaking changes which I intend to follow up with) |
Yup fair enough. Re-exporting the constructors |
Well... a lot has been merged since my (unironic, then; not sure so much, now) comment above. I guess there might be time to revisit this for v2.0, but I'd once again counsel against that, not least because it's only recently come home to me that the 'modern' approach to TL;DR: however you choose to represent the relation, consider carefully (the ... so, with due apologies in advance if I have misunderstood (!?) the nature of the issue, please read on... for an old-timer's perspective: Back in the Good Old Days (TM) (1990, to locate this personally for me; no real native inductive types in LEGO or Coq at this point, so things got defined impredicatively...), there were/semed to be two extremal versions of how to define the relation:
NB
Now, each of these choices (my PhD thesis chose the declarative one; the Coq developers the algorithmic) involves Lots (TM) of different amounts of work in showing equivalence (I forget if
NB Fans of views may note that the latter move (and indeed the former!) may be accomplished by defining a suitable view of either relation (or any other representation, for that matter). Is that the content of @MatthewDaggitt 's The current choices of a version of the relation intermediate between the above two extremes seems (with the 'benefit' (!?) of 30+years' hindsight... ;-)) ... worth revisiting, at least, before proceeding. |
So... there is probably a lot more to discuss (ahead of any eventual PR for review; I was probably premature in filing #2317 but my experience so far has led me to some of the things I'll propose below), but here goes, with a big pinch of IMNSVHO, a possible route-map ( (BREAKING) The thing, heartbreaking for me at least, about the legacy implementations is the missed opportunity from the ground up to unify the two presentations by choosing This would permit a number of things:
(NON-BREAKING)
(DOWNSTREAM)
|
Okay so there's a few ways to proceed:
Thoughts? |
Well, I had understood your critique of #2317 to amount to "do 2, then do 3, and then loop back to 1 eventually if necessary", and that's what I am slowly proceeding towards in refactoring that PR into more manageable pieces. But I still thought it worth arguing for one possible design for a breaking change which is sufficiently 'small' (specialise |
Yes that sounds reasonable.
The problem is although it's a small change semantically, I do sympathise with the urge to fix things immediately! I find it quite frustrating that we can't! |
So I thought I could knock-up a version of the (BREAKING) proposal, but it foundered on not getting sharing to work between an import of
Any idea how to achieve such sharing in general? (Also the arithmetic of |
As for client code/users making use of It feels as though that;s not something to use on the RHS ever (in favour of a definitional proof of reflexivity) and as I've attempted to argue already, the exposure of the patterns in the various definitions is most of the source of the problem in the first place! You can just about get away with using it on the LHS during pattern-matching, if |
Looping back to this point, the significance of which I missed the first time around: |
I think that this should probably stay open, as merging #2333 only begins the process of unifying these two definitions, and @gallais 's #1761 (and the various parts to that which I have attempted to break up into more manageable pieces) . I think I/we were premature in tagging #2333 as 'fixing' this issue outright? |
Unlike other binary relations over lists,
Data.List.Relation.Binary.Permutation.(Setoid/Propositional)
are implemented separately which results in an awful lot of proof duplication. It also means that other modules (e.g.Subset
) don't play nice when trying to transfer results from setoid equality to propositional equality. I've added the breaking tag as it remains to be seen if they can be unified in a backwards compatible manner.The text was updated successfully, but these errors were encountered: