coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Gregory Malecha <gmalecha AT gmail.com>
- To: Coq Club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Familiarity with eauto implementation
- Date: Thu, 5 Dec 2019 04:43:31 -0500
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=gmalecha AT gmail.com; spf=Pass smtp.mailfrom=gmalecha AT gmail.com; spf=None smtp.helo=postmaster AT mail-wm1-f54.google.com
- Ironport-phdr: 9a23:Wjcr5BQTSaSaP+ilD1Ct9dImldpsv+yvbD5Q0YIujvd0So/mwa6ybRGN2/xhgRfzUJnB7Loc0qyK6vumADxZqs7f+Fk5M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aFRrwLxd6KfroEYDOkcu3y/qy+5rOaAlUmTaxe7x/IAi4oAnLq8UbgpZuJqktxhbIv3BFZ/lYyWR0KFyJgh3y/N2w/Jlt8yRRv/Iu6ctNWrjkcqo7ULJVEi0oP3g668P3uxbDSxCP5mYHXWUNjhVIGQnF4wrkUZr3ryD3q/By2CiePc3xULA0RTGv5LplRRP0lCsKMSMy/XrJgcJskq1UvBOhpwR+w4HKZoGVKOF+db7Zcd8DWGZNQtpdWylHD4y7coUPEvEBPf5GoIbhu1sAoxy+BQy2C+PuzD9Dm3v60KI+3ugkFwzNwQ4uEM8UsHnMo9r1OqUdX+C7wqfL0DvNce9Z1Czn54TUaB0su+2AUa5yfMfX1EIhFxnFjlKVqYH9Pj2VzPoCs2ec7+p6VeOklmkppBt1ojex2sgsipPGjZ8Sx1DL8CV22oI1KsOkR057e9GpC5RQtySAOIt3RsMuWX1nuCE/yrAfv5OwYSYEyJMixxHFavyHdZCF7Qj5VOmNITd4hWxld6ykhxqr9kig1/P8Wdeu0FZWsCVFicPAtn4X1xDL5ciHS+d9/ke82TmUzQzT6+ZELVg7laraN54hwqMwmYEJvUvfGS/2nUP7h7KVeEU84uWk9fjrb7H8qpKfN4J4kBzyProtl8ClAek1PQ4DVHWB9+umzr3s50j5Ta1KjvIolqnZt4jXJcEBqa64Bw9Zy4gi6xOiAzu/3tQVnXYKIEhKeBKAiIjpNFXOL+7iAfijhFSslS9nx/HAPrL/HpXANmbPnKvlcLpn6ENRyBA/wc1B659XEL0MIP3+Vlf0tNPCDx85NwK0w/zgCNV4zo4eVmePDbWdMKzMrVCI5vggLvKDZI8Qojn9Kvwl6+Tygn8+nF8RZbOp0ocPaHCkAvRmJF2UbmbrgtcYCGsFog4+TPHxh1CZSj5SZ3OyX7om6T0hCYKmC53DRoG3j7Cb0ie7BM4eWmcTIVeVWVzsao/MD/wLcWeZJtJruj0CT7moDYE7g0KArgj/npV9I+XT4DxQkJvn2dN17qWHmhQ78TF/D8213GSETmUylWQNEWxllJtjqFBwnw/QmZNzhOZVQJkOvqoUADd/DobVyqlBM/63Wg/FeY3UGlOvQ9HjHjRoC9xsn5kBZEFyH9jkhRfGjXLzUu0l0oeTDZlxyZrymn34JsJz0XHDjfBzgFwvQ88JPmqj1Pcmq1rjQrXRmkDcrJ6EMLwG1XeUpmiGxGuK+kpfVVwoXA==
Thanks, Theo!
On Wed, Dec 4, 2019 at 5:22 AM Théo Zimmermann <theo.zimmi AT gmail.com> wrote:
Hi Gregory,
There is a well-known (or maybe not so well-known) trick that allows
using eauto in "forward mode" (apply a lemma and then stop), which is
to use it in combination with shelve and unshelve. I mention this
briefly in this document:
https://hal.archives-ouvertes.fr/hal-01671994/document.
During the 2018 Coq Implementors Workshop, we worked with Michael and
Armaël at improving the support for this kind of forward reasoning
mode, in particular with the (still unfinished) PR
https://github.com/coq/coq/pull/7661 (both Armaël and I are defending
our PhD theses soon, so that might explain the lingering state).
None of this information is given to discourage you working on your
project plugin though. I didn't take the time to look at your code
just yet, but I'd advise that you avoid "eauto.mli" and rather look at
what is available in "class_tactics.mli", in particular the
"autoapply" function, as there are plans to remove the (old)
implementation of "eauto" in favor of the one of "typeclasses eauto"
(while keeping compatibility as much as possible, cf.
https://github.com/coq/coq/pull/721).
Sorry for not taking more time to answer more properly.
Théo
Le mer. 4 déc. 2019 à 10:45, Gregory Malecha <gmalecha AT gmail.com> a écrit :
>
> Hello --
>
> I'm working on a plugin that uses hint databases (and discrimination trees) to apply any of a collection of lemmas (or external tactics). I don't believe this functionality exists, but please correct me if I am wrong. Essentially
>
> Hint Resolve lem1 lem2 : hint_db.
> Hint Extern 0 (f _ _) => tac : hint_db.
> apply_any hint_db
>
> should act like (order is not important)
>
> eapply lem1 + eapply lem2 + tac + fail "no lemma applies"
>
> I've come up with a simple skeleton of this: https://github.com/gmalecha/coq-apply-any
> The function that I'm not sure how to implement is: https://github.com/gmalecha/coq-apply-any/blob/master/src/apply_any.ml#L1
> I was expecting that a function like this would be exported from eauto.mli, but my readings over that code seem like that might not be the case. Can someone with more familiarity with that code suggest where to look?
>
> Thanks.
>
> --
> gregory malecha
> gmalecha.github.io
gregory malecha
- [Coq-Club] Familiarity with eauto implementation, Gregory Malecha, 12/04/2019
- Re: [Coq-Club] Familiarity with eauto implementation, Théo Zimmermann, 12/04/2019
- Re: [Coq-Club] Familiarity with eauto implementation, Gregory Malecha, 12/05/2019
- Re: [Coq-Club] Familiarity with eauto implementation, Théo Zimmermann, 12/04/2019
Archive powered by MHonArc 2.6.18.