-
Notifications
You must be signed in to change notification settings - Fork 700
Iff as a proper connective #140
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
Conversation
|
Is there any reason not to make iff a record and define projections for it? |
|
Same question as Jason. I often write the following kind of code (e.g. about 150 occurrences in Interval) and, if there are no projections, it would become I can obviously define my own projections to avoid this noise. But if every user does, they might as well be part of the standard library. Or perhaps it is another case where you expect that the coercion to |
|
Having it as a record would make it a tiny bit easier to eventually turn on primitive projections, I think |
|
If the porting of the standard library is to be believed, then this is a very welcome change: pretty much every single line changed is now shorter. Nevertheless, and to echo previous comments, I would prefer that there is no coercion to |
|
Perhaps there should be coercions in both directions in the compatibility file, and no coercions in the standard library? |
|
I don't see how to mainly keep the compatibility without a coercion, but having a coercion in the compat file and let users require this file (or add explicitly the coercion themselves) is also ok to me. Would it be an ok migration strategy for @silene if this no-coercion compat-file-based strategy is adopted? |
|
The compilation of this PR fails already on the test-suite with 5 errors. |
|
The compatibility file is fine when you need to compile an old library with a recent Coq. But, when you need to compile a recent library with both an old (8.5) and a recent Coq (8.6), it is no longer suitable because it imposes an all-or-nothing choice which gets you stuck in the past. But do not worry about me, I will ship my own compat file that contains only the iff coercions and no other compatibility features. |
|
My current position on this problem: This is a library issue worth to be improved but we need smart ideas to improve compatibility (or at least a clear support from users to accept the incompatiblity). |
|
Wouldn't be this issue the perfect example for trying @Zimmi48 's suggestion of versioning the std library ? |
|
@ejgallego: yes, that may be attempted. Don't know what others think... |
|
I would think that versioning the library would be the solution here indeed and BTW this is what Michael Soegtop is asking for. |
This is in PR #186 , and indeed it is not too far from being in a mergeable state. Main objections to the PR were about the binding and namespacing mechanism, I favor a very simple solution there.
We could also use a layout
Indeed I'd say that even if the stdlib is moved to an independent repository, we should still have all of them as submodules in the main repository so |
On the use of sub-modules for that particular application, I have to disagree: sub-modules require to specify a specific commit when including a dependency. This is very fine for many purposes, and I do personally use sub-modules for applications where this feature is actually handy. But I don't think that it makes sense here because each time the library would be updated, the main repo would need updating as well. |
|
Indeed I see the problem, but however it seemed to me that using the "fresh build" model could be too unstable for the main Coq core codebase. I was thinking that the libraries should be pinned at the Coq level, so you actually test what users will get. In this model is the library developers who need to be sure that their dev branch is OK with Coq. |
That seems to contradict the model you were advocating for, when testing external developments. |
Umm, indeed external developers now seem to have the same contract "you need to be sure that your dev branch is OK with Coq", haven't they? With the submodules, I was thinking more of how the regular Coq make should behave for developers. It seemed to a bit heavy to me to do a full checkout at every make, but maybe that is the right thing to do. Honestly, I don't have a clear idea on what would be best. I most that I have thought is about splitting CoqIDE. The model I envisioned for CoqIDE was indeed the one where CoqIDE was independent, but always built by means of a submodule. The workflow would be as follows:
|
|
A page of wishes is fine to me. Actually, there are already some on cocorico. We could just add links to WIPs on such a page. |
|
If discussion is warranted, maybe a CEP is the right place to have it? |
|
For the sake of completeness, here is the CEP about versioning the library: rocq-prover/rfcs#18 |
|
Changing the flag from |
|
As was discussed at a WG, I find the direction taken by this PR worth to be investigated but it is not my priority considering the efforts in term of compatibility management that it requires. As was more or less discussed at this WG according to my memories, I consider @maximedenes as taking over this PR. Shall @maximedenes would prefer to close it, I would just require that a trace of the idea remain somewhere. |
|
@maximedenes Can you open a new issue or GitHub project or a wiki page or some place to collect all the ideas / projects related to the new Standard Library? Then, we can close this PR. |
|
cc: #7312 |
|
Shouldn't we close this PR in the meantime? |
|
Adding to the Stdlib 2.0 project and closing. |
|
Note the trick: if you add it before closing, GitHub will move it in the "Done" column, which is not what we want. |
Typo in the page about creating coq opam packages
This commit proposes to implement the long-standing request of defining "iff" as a proper connective distinct from "and" and to remove the ad hoc "extcore" hint database whose only purpose was to have "auto" working with "iff" without breaking the compatibility of auto.
So this is late attempt to start on a better basis with iff, but better late than never.
Preserving compatibility with just a flag would be difficult. In a first time, we should test this on a larger set of user developments.
Two kinds of incompatibilities are observable in the standard library:
Note; The commits should be squashed into one before merging.