[coercions] Remove uniform inheritance condition#15789
[coercions] Remove uniform inheritance condition#15789coqbot-app[bot] merged 6 commits intorocq-prover:masterfrom
Conversation
5834e84 to
5ce958e
Compare
5ce958e to
fc1eec1
Compare
|
Some more:
I have the tests written up, I can push here if you like. |
|
Great, feel free to push |
|
Please start a bench job from the gitlab pipeline interface and post here the link to the job. If you can't we shall give you rights. |
|
For reference all those bugs I mentioned are definitely fixed by this patch and not on master. |
|
@pi8027 IIRC you had a use case for the uniform inheritance check in the context of packed classes. I believe this PR makes the need to obey the condition (in all contexts, not just packed classes) go away, but it may still be useful to know when the condition is not met (in the contexts where it makes sense). Is this right, or my memory fails? If I'm right then one may want to be able to turn on the warning manually. |
|
@proux01 can you explain here how the failures in CI did manifest? I'd like to understand them, and see if we can add something to help other users understand what failed (if hard to grasp). |
Bench resultsLooks to me like no change. |
|
I'm having a look at #9696 and there is an example there that doesn't quite work with this patch. Axiom f : forall {A}, option (option A) -> list A.
(* Coq used to accept this with a warning... *)
Coercion f : option >-> list.
(* Coq used to fail here *)
Check (Some (Some 0) : list nat).So it seems to be an issue with implicit arguments in coercions. That is proposed to be fixed by #11327. I guess this patch correctly removes the warning, but doesn't solve the implicit arguments or incorrect documentation. |
doc/changelog/02-specification-language/15789-coercions-no-uniform-cond.rst
Outdated
Show resolved
Hide resolved
doc/changelog/02-specification-language/15789-coercions-no-uniform-cond.rst
Outdated
Show resolved
Hide resolved
e6c574d to
9bc51fb
Compare
|
For the CI, you may ask a specialist of interpreting such results, but 1.7% for a total of 21s may just be noise. Good to see work on coercions in passing! |
9bc51fb to
1b00631
Compare
doc/changelog/02-specification-language/15789-coercions-no-uniform-cond.rst
Show resolved
Hide resolved
This removes the uniform inheritance condition by using inference (mostly unification, but also canonical structures or typeclasses) to obtain the parameters of coercions.
1b00631 to
0e0c6e0
Compare
|
I did push two extra test file about TC and CS resolution which don't seem to be covered elsewhere. It works! |
Indeed, this was not properly tested, thanks! |
3458c76 to
74812d2
Compare
|
@coqbot merge now |
This depends on coq v8.16 and is not usable on lower versions. Relevant issues and PRs from the coq repo: rocq-prover/rocq#15789, rocq-prover/rocq#15853, rocq-prover/rocq#4593, rocq-prover/rocq#3115
This depends on coq v8.16 and is not usable on lower versions. Relevant issues and PRs from the coq repo: rocq-prover/rocq#15789, rocq-prover/rocq#15853, rocq-prover/rocq#4593, rocq-prover/rocq#3115
This follows a discussion on Zulip: https://coq.zulipchat.com/#narrow/stream/237977-Coq-users/topic/Identity.20Coercions
This removes the uniform inheritance condition by using inference (mostly unification, but also canonical structures or typeclasses) to obtain the parameters of coercions.
Will conflict with #15693 I could rebase whichever is not merged first.
Overlay (should be merged before merging the current PR):