-
Notifications
You must be signed in to change notification settings - Fork 631
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
Moving general-purpose rapply from Programs to Init #17209
Conversation
I believe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm in favor.
I agree that the implementation of apply
should be moved to the refine
engine (ideally while keeping the current behavior of decomposing single-constructor inductives). However, the distinction between apply
and eapply
should be kept, and the move should be done in OCaml, not Ltac, I think.
I realize that Program's Require Import Program.
Axiom A : forall R:nat -> Prop, forall x, R x.
Goal forall R:nat -> Prop, forall x, R x.
Fail rapply A. (* Unable to unify "?Goal ?Goal0" with "forall (R : nat -> Prop) (x : nat), R x" *) I guess that the motivation to start with maximal application is efficiency, so I don't know what to think. This can be addressed if moved to OCaml though. |
I would prefer an OCaml implementation for rapply since we are paying attention to it. I'm also of the non-blocking opinion that the prelude should be reduced not increased. i.e. If a tactic is considered built-in, then it should be built-in. |
I made an experimental branch at https://github.com/herbelin/github-coq/pull/new/master+native-rapply so that we can discuss what to do with it, based on concrete code. It provides |
@coqbot run full CI |
@coq/stdlib-maintainers this has been stalled for a while, please take a decision (eg merge / close / say that something specific needs to be done before merge) If you merge before the branch you can put back the milestone. |
ping @coq/stdlib-maintainers |
I am in favor of merging one implementation or the other. The Ltac one looks good to me despite limitations; if we want the OCaml one somebody else should review in detail. I don't have a particular preference for it being in prelude, so if those opposing that placement could offer an alternative that might be better indeed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a fan of moving this to Init. I think probably an OCaml variant might be better, but I'm happy to have this merged and defer the decision on the OCaml implementation to later.
Hearing no suggested changes, I intend to merge this PR next time I look at it. |
@coqbot run full ci it's been almost a year |
@coqbot merge now |
Who has experience with
rapply
? Shouldn't it be at some time the defaultapply
(or, at least, unifall would lead to identify apply and rapply, right?)?There is an alternative definition of
rapply
in TLC (and Software Foundations) which seems currently broken. Since there is a version ofrapply
already in Coq, maybe should we just rely on this one??