-
Notifications
You must be signed in to change notification settings - Fork 246
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
Infix proofs #2549
Comments
@JacquesCarette thanks for the thoughtful pushback on issues raised in #2542 and the subsequent #2545 that I raised. TL;DR:
Picking up the last point at length: it was not clear to me that the 'easy' consensus (including me!) about changing the design towards a postfix, explicitly-quantified proof of Now, I had on the originating issue, of which this is now an offshoot, and a perhaps unhelpfully more general one (I haven't "abandoned infix proof names" as such!?), commented on what I thought might be the 'ux' aspects of @mechvel 's original proposal: namely what is it that we are achieving by making The issue you raise here is independently interesting, but feels almost orthogonal to the original. I'll try to address it in subsequent comments. In any case, the whole discussion had been in the context of comments/possible variations on v2.2-rc1, which I personally don't think should have been held up by these more substantive, moreover 'tricky', design decisions. In like fashion, the rest of #2542 concerned issues which address long-standing gaps in the v1.* and v2.* library API, and which are also therefore, as @MatthewDaggitt pointed out, really out-of-scope for a point release version bump... |
To address this new issue: I am not against infix/mixfix proofs! But @MatthewDaggitt 's sensible, justified objections make clear that we need to be careful how we proceed, and perhaps as you hint above, there may not be hard-and-fast rules we can stick to. What's my 'favourite' example? But then @MatthewDaggitt 's objections do bite, and quite hard, too: such 'intuition' only makes sense once the carrier and the underlying relation/underlying That said, this is surely what ... and in this instance, my 'preferred'/'favourite' idiomatic way to (re-)express that dependency would be as an (infix!) annotation on proof-terms, a specimen version here would be (roughly!): syntax alg.∙-cong p q = p ∙-cong[ alg ] q so that congruence proofs are now tagged wrt to the algebra on which they operate, but in an argument position which can easily be replaced by But I'm not sure whether Agda's mechanisms can support this, either in theory, or in practice! As regarding practice, we certainly don't currently do this in |
The reason I brought this up as an issue here and didn't really comment on the PR is that I agreed that for v2.2, what was done was best. This requires too much discussion. Regarding the syntax of some items: one of the design decisions we could make is to explicitly declare what the convention is for each. The library used to have some items (the old <$> comes to mind) that were meant to be used on the record, which was different than most things (but I really quite liked! At least this notation is available again). What I mean is that maybe some notation is meant to be used when the module's parameters have been fully supplied, and other notation is meant to be used partially applied. Other uses may results in "a mess", but that's then the user's choosing. Your idea wrt congruence proofs would fit into that scheme, I would think. |
In #2545 @jamesmckinna mentions
and proceeds to abandon infix proof names because of that, and @MatthewDaggitt concurs.
I think we should separate two things:
We could easily consider part 1 to be a temporary (ahem) wart that will, in time, get fixed. It sure is a pain.
But should our naming conventions be robust wrt to under-parametrization at all? It might make sense to have naming conventions that are only 'nice' when module arguments are fully applied, and no guarantees otherwise. I think we're robbing ourselves of some rather elegant syntax if things need to be always even when the number of parameters is "wrong" !!
The text was updated successfully, but these errors were encountered: